Skip to content

Commit 2f562c8

Browse files
committed
Clean up
- Streamline coding style - Remove unused "source-map" module
1 parent c3bc86b commit 2f562c8

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

index.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@
44
*/
55
var htmlMinifier = require("html-minifier");
66
var attrParse = require("./lib/attributesParser");
7-
var SourceNode = require("source-map").SourceNode;
87
var loaderUtils = require("loader-utils");
98
var url = require("url");
109
var assign = require("object-assign");
1110
var compile = require("es6-templates").compile;
1211

1312
function randomIdent() {
1413
return "xxxHTMLLINKxxx" + Math.random() + Math.random() + "xxx";
15-
};
14+
}
1615

1716
function getLoaderConfig(context) {
1817
var query = loaderUtils.parseQuery(context.query);
@@ -83,15 +82,15 @@ module.exports = function(content) {
8382
"removeScriptTypeAttributes",
8483
"removeStyleTypeAttributes",
8584
].forEach(function(name) {
86-
if (typeof minimizeOptions[name] === "undefined") {
85+
if(typeof minimizeOptions[name] === "undefined") {
8786
minimizeOptions[name] = true;
8887
}
8988
});
9089

9190
content = htmlMinifier.minify(content, minimizeOptions);
9291
}
9392

94-
if (config.interpolate) {
93+
if(config.interpolate) {
9594
content = compile('`' + content + '`').code;
9695
} else {
9796
content = JSON.stringify(content);

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
"fastparse": "^1.0.0",
99
"html-minifier": "^1.0.0",
1010
"loader-utils": "~0.2.2",
11-
"object-assign": "^4.0.1",
12-
"source-map": "^0.5.3"
11+
"object-assign": "^4.0.1"
1312
},
1413
"devDependencies": {
1514
"mocha": "^2.3.4",

0 commit comments

Comments
 (0)