Skip to content
This repository has been archived by the owner on Jan 4, 2019. It is now read-only.

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
- Remove nopt from lib/vulcan.js
- inline scripts before removing whitespace
  • Loading branch information
dfreedm committed Jan 9, 2014
1 parent 30b5890 commit 324df0a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
9 changes: 4 additions & 5 deletions lib/vulcan.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ var fs = require('fs');
var path = require('path');
var url = require('url');
var cheerio = require('cheerio');
var nopt = require('nopt');
var EOL = require('os').EOL;

var EOL = require('os').EOL;
var ABS_URL = /(^data:)|(^http[s]?:)|(^\/)/;
var DEFAULT_OUTPUT = 'vulcanized.html';
var ELEMENTS = 'polymer-element';
Expand Down Expand Up @@ -312,12 +311,12 @@ function handleMainDocument() {
imports_before_polymer = deduplicateImports(imports_before_polymer);
insertImport($, import_pos, imports_before_polymer.join(EOL) + EOL);
insertInlinedImports($, import_pos, output);
if (options.strip) {
removeCommentsAndWhitespace($);
}
if (!options.csp && options.inline) {
inlineScripts($, options.outputDir);
}
if (options.strip) {
removeCommentsAndWhitespace($);
}
var outhtml = $.html();
fs.writeFileSync(options.output, outhtml, 'utf8');
}
Expand Down
6 changes: 2 additions & 4 deletions test/import-test.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@host {
* {
background: orange;
}
:host {
background: orange;
}

0 comments on commit 324df0a

Please sign in to comment.