Move CDN Url into deploy script

This commit is contained in:
Jordan Eldredge 2017-10-09 16:34:51 -07:00
parent 706724313b
commit b7d0195ea9
3 changed files with 3 additions and 3 deletions

View file

@ -52,7 +52,6 @@
"url-loader": "^0.5.7",
"webpack-dev-server": "^2.7.1"
},
"cdnUrl": "https://d38dnrh1liu4f5.cloudfront.net/projects/winamp2-js/",
"dependencies": {
"babel": "^6.23.0",
"babel-plugin-transform-object-rest-spread": "^6.20.2",

View file

@ -26,7 +26,7 @@ echo "Run tests"
( cd $NEW_CLONE && yarn run test )
echo "Build the webpack bundle"
( cd $NEW_CLONE && yarn run build )
( cd $NEW_CLONE && CDN_URL=https://d38dnrh1liu4f5.cloudfront.net/projects/winamp2-js/ yarn run build )
echo "Cleaning up node_modules/ to save space"
( cd $NEW_CLONE && rm -r node_modules )

View file

@ -1,7 +1,8 @@
const { cdnUrl } = require("./package.json");
const config = require("./webpack.config");
const webpack = require("webpack");
const cdnUrl = process.env.CDN_URL || "/";
config.plugins = (config.plugins || []).concat([
new webpack.DefinePlugin({
"process.env": {