mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-25 07:22:33 -05:00
Merge pull request #792 from paulkaplan/fix-webpack-dev-server
Only uglify if building for production.
This commit is contained in:
commit
8ce20fd308
2 changed files with 5 additions and 4 deletions
|
@ -5,13 +5,14 @@ node_js:
|
||||||
env:
|
env:
|
||||||
- NPM_SCRIPT="tap:unit -- --jobs=4"
|
- NPM_SCRIPT="tap:unit -- --jobs=4"
|
||||||
- NPM_SCRIPT="tap:integration -- --jobs=4"
|
- NPM_SCRIPT="tap:integration -- --jobs=4"
|
||||||
|
- NODE_ENV=production
|
||||||
sudo: false
|
sudo: false
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- node_modules
|
- node_modules
|
||||||
install:
|
install:
|
||||||
- npm install
|
- npm --production=false install
|
||||||
- npm update
|
- npm --production=false update
|
||||||
script: npm run $NPM_SCRIPT
|
script: npm run $NPM_SCRIPT
|
||||||
jobs:
|
jobs:
|
||||||
include:
|
include:
|
||||||
|
|
|
@ -20,12 +20,12 @@ const base = {
|
||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: process.env.NODE_ENV === 'production' ? [
|
||||||
new webpack.optimize.UglifyJsPlugin({
|
new webpack.optimize.UglifyJsPlugin({
|
||||||
include: /\.min\.js$/,
|
include: /\.min\.js$/,
|
||||||
minimize: true
|
minimize: true
|
||||||
})
|
})
|
||||||
]
|
] : []
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = [
|
module.exports = [
|
||||||
|
|
Loading…
Reference in a new issue