You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/index.js
+2-4Lines changed: 2 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -3,8 +3,6 @@
3
3
* @description : This plugin will omit bundled JS files, for dependencies that are exclusively CSS which become obsolete once extract-text-plugin extracts inlined CSS into its own .css file
4
4
*/
5
5
6
-
constchalk=require('chalk');
7
-
8
6
/**
9
7
* @param {Object} options - Configurable options
10
8
* @constructor
@@ -31,9 +29,9 @@ function OmitJSforCSSPlugin(options) {
console.log(chalk.bold(chalk.red('PREVIEW'))+chalk.grey(' File to be omitted for ')+chalk.bold(chalk.green(omitted.chunkName))+' : '+chalk.bold(chalk.green(omitted.filename)));
32
+
console.log(`PREVIEWFile to be omitted for ${omitted.chunkName} : ${omitted.filename}`);
35
33
}else{
36
-
this.options.verbose&&console.log(chalk.grey('File Omitted for ')+chalk.bold(chalk.green(omitted.chunkName))+chalk.grey(' : ')+chalk.bold(chalk.green(omitted.filename)));
34
+
this.options.verbose&&console.log(`File omitted for ${omitted.chunkName} : ${omitted.filename}`);
Copy file name to clipboardExpand all lines: test/options.test.js
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -58,8 +58,8 @@ describe('Options', () => {
58
58
inspect.restore();
59
59
60
60
assert.deepEqual(inspect.output,[
61
-
'\u001b[1m\u001b[31mPREVIEW\u001b[39m\u001b[22m\u001b[90m File to be omitted for \u001b[39m\u001b[1m\u001b[32mb\u001b[39m\u001b[22m : \u001b[1m\u001b[32mb.js\u001b[39m\u001b[22m\n',
62
-
'\u001b[1m\u001b[31mPREVIEW\u001b[39m\u001b[22m\u001b[90m File to be omitted for \u001b[39m\u001b[1m\u001b[32mb\u001b[39m\u001b[22m : \u001b[1m\u001b[32mb.js.map\u001b[39m\u001b[22m\n'
61
+
'PREVIEW File to be omitted for b : b.js\n',
62
+
'PREVIEW File to be omitted for b : b.js.map\n'
63
63
]);
64
64
65
65
done();
@@ -91,8 +91,8 @@ describe('Options', () => {
91
91
inspect.restore();
92
92
93
93
assert.deepEqual(inspect.output,[
94
-
'\u001b[90mFile Omitted for \u001b[39m\u001b[1m\u001b[32mb\u001b[39m\u001b[22m\u001b[90m : \u001b[39m\u001b[1m\u001b[32mb.js\u001b[39m\u001b[22m\n',
95
-
'\u001b[90mFile Omitted for \u001b[39m\u001b[1m\u001b[32mb\u001b[39m\u001b[22m\u001b[90m : \u001b[39m\u001b[1m\u001b[32mb.js.map\u001b[39m\u001b[22m\n'
0 commit comments