| Index: node_modules/vulcanize/lib/vulcan.js
|
| diff --git a/node_modules/vulcanize/lib/vulcan.js b/node_modules/vulcanize/lib/vulcan.js
|
| index 0d7e230add04c5c206444bfe6264e4081cdbedcf..82c3969256dd67a74beef5bb660dfeaff6610995 100644
|
| --- a/node_modules/vulcanize/lib/vulcan.js
|
| +++ b/node_modules/vulcanize/lib/vulcan.js
|
| @@ -10,7 +10,6 @@
|
|
|
| // jshint node: true
|
|
|
| -var cssom = require('cssom');
|
| var fs = require('fs');
|
| var path = require('path');
|
| var uglify = require('uglify-js');
|
| @@ -200,19 +199,13 @@ function compressJS(content, inline) {
|
| }
|
|
|
| function compressCSS(content) {
|
| - var out;
|
| - try {
|
| - var ast = cssom.parse(content);
|
| - out = ast.toString();
|
| - } catch (e) {
|
| - if (options.verbose) {
|
| - console.log('Error parsing CSS:', e.toString());
|
| - console.log('Falling back to removing newlines only');
|
| - }
|
| - out = content;
|
| - } finally {
|
| - return out.replace(/[\r\n]/g, '');
|
| - }
|
| + // remove newlines
|
| + var out = content.replace(/[\r\n]/g, '');
|
| + // remove css comments (/* ... */)
|
| + out = out.replace(/\/\*(.+?)\*\//g, '');
|
| + // remove duplicate whitespace
|
| + out = out.replace(/\s{2,}/g, ' ');
|
| + return out;
|
| }
|
|
|
| function removeCommentsAndWhitespace($) {
|
|
|