-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version 3.x #575
Closed
Closed
Version 3.x #575
Changes from 9 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
0a7d224
Rename `closingTag` into `voidTag` like in the official w3c spec.
jantimon e8f749f
updated README (#539)
numical 3d1e403
Update README.md
jantimon 82bba6a
Update README.md
jantimon 78cb986
Fix template path resolving regexp to support loader query parameters…
PeachScript 7c0ad50
Fix template compilation for es6 modules (#550)
spuf 76e05ef
Fix travis-ci: set tty size (#552)
spuf f30426e
Add link to html-webpack-include-assets-plugin (#560)
jharris4 9628e65
Remove html minification
SpaceK33z ed00a67
Update changelog
jantimon c5b8382
Remove `text/javascript` from all script tags
SpaceK33z d937cb2
Remove support for node 0.10
jantimon 717eb68
Document `yarn link` before running tests (#570)
SpaceK33z 0ba2165
Use arrow functions
jantimon 0b4ce98
Fix codestyle
jantimon ae4a49e
Update version number
jantimon d64827a
fix(chunksorter): webpack2 compatible (#569)
hekike 374e23e
chunks passed to alter-assets event (#574)
numical 4404f9d
Use charset="utf-8" as proposed in #522
jantimon 57bb628
Use es6 classes
jantimon aa137c9
Use let/const instead of var
jantimon 426dfc7
Update readme
jantimon 7804cc3
Update urls
jantimon cd5fe73
Add bithound configuration
jantimon 8039058
Adjust example loader configuration
jantimon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
4.3.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,11 @@ | ||
<!doctype html><html lang="en" manifest="manifest.appcache"><head><meta charset="utf-8"><title>Example template</title><meta name="viewport" content="width=device-width,initial-scale=1"><link href="styles.css" rel="stylesheet"></head><body><img src="0714810ae3fb211173e2964249507195.png"><script type="text/javascript" src="bundle.js"></script></body></html> | ||
<!doctype html> | ||
<html lang="en" manifest="manifest.appcache"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Example template</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<link href="styles.css" rel="stylesheet"></head> | ||
<body> | ||
<img src="0714810ae3fb211173e2964249507195.png"> | ||
<script type="text/javascript" src="bundle.js"></script></body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,11 @@ | ||
<!doctype html><html lang="en" manifest="manifest.appcache"><head><meta charset="utf-8"><title>Example template</title><meta name="viewport" content="width=device-width,initial-scale=1"><link href="styles.css" rel="stylesheet"></head><body><img src="0714810ae3fb211173e2964249507195.png"><script type="text/javascript" src="bundle.js"></script></body></html> | ||
<!doctype html> | ||
<html lang="en" manifest="manifest.appcache"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Example template</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<link href="styles.css" rel="stylesheet"></head> | ||
<body> | ||
<img src="0714810ae3fb211173e2964249507195.png"> | ||
<script type="text/javascript" src="bundle.js"></script></body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/** | ||
* This file helps to work with html tags as objects which are easy to modify | ||
* and turn into a string | ||
*/ | ||
|
||
/** | ||
* Turn a tag definition into a html string | ||
*/ | ||
function htmlTagObjectToString (tagDefinition, xhtml) { | ||
var attributes = Object.keys(tagDefinition.attributes || {}) | ||
.filter(function (attributeName) { | ||
return tagDefinition.attributes[attributeName] !== false; | ||
}) | ||
.map(function (attributeName) { | ||
if (tagDefinition.attributes[attributeName] === true) { | ||
return xhtml ? attributeName + '="' + attributeName + '"' : attributeName; | ||
} | ||
return attributeName + '="' + tagDefinition.attributes[attributeName] + '"'; | ||
}); | ||
return '<' + [tagDefinition.tagName].concat(attributes).join(' ') + (tagDefinition.voidTag && xhtml ? '/' : '') + '>' + | ||
(tagDefinition.innerHTML || '') + | ||
(tagDefinition.voidTag ? '' : '</' + tagDefinition.tagName + '>'); | ||
} | ||
|
||
/** | ||
* Static helper to create a tag object to be get injected into the dom | ||
* | ||
* @param {String} tagName - the name of the tage e.g. 'div' | ||
* @param {Object} attributes - tag attributes e.g. `{ 'class': 'example', disabled: true }` | ||
*/ | ||
function createHtmlTagObject (tagName, attributes) { | ||
// https://www.w3.org/TR/html5/syntax.html#void-elements | ||
var voidTags = ['area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr']; | ||
return { | ||
tagName: tagName, | ||
voidTag: voidTags.indexOf(tagName) !== -1, | ||
attributes: attributes | ||
}; | ||
} | ||
|
||
module.exports = { | ||
createHtmlTagObject: createHtmlTagObject, | ||
htmlTagObjectToString: htmlTagObjectToString | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aren't promises native in the required versions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now the code depends on http://bluebirdjs.com/docs/api/promise.promisify.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you accept a PR to change that?