diff options
Diffstat (limited to 'node_modules/uglifyjs-webpack-plugin/lib/post_install.js')
-rw-r--r-- | node_modules/uglifyjs-webpack-plugin/lib/post_install.js | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/node_modules/uglifyjs-webpack-plugin/lib/post_install.js b/node_modules/uglifyjs-webpack-plugin/lib/post_install.js deleted file mode 100644 index 4cc9a3236..000000000 --- a/node_modules/uglifyjs-webpack-plugin/lib/post_install.js +++ /dev/null @@ -1,31 +0,0 @@ -/* eslint-disable */ -// adapted based on rackt/history (MIT) -// Node 0.10+ -var execSync = require('child_process').execSync; -var fs = require('fs'); - -// Node 0.10 check -if (!execSync) { - execSync = require('sync-exec'); -} - -function exec(command) { - execSync(command, { - stdio: [0, 1, 2] - }); -} - -fs.stat('dist', function(error, stat) { - // Skip building on Travis - if (process.env.TRAVIS) { - return; - } - - if (error || !stat.isDirectory()) { - // Create a directory to avoid getting stuck - // in postinstall loop - fs.mkdirSync('dist'); - exec('npm install --only=dev'); - exec('npm run build'); - } -}); |