Skip to content

Commit

Permalink
#96 automatically generate timestamp at every build
Browse files Browse the repository at this point in the history
  • Loading branch information
blacroix committed Oct 6, 2017
1 parent 1354a48 commit ff744b7
Show file tree
Hide file tree
Showing 6 changed files with 90 additions and 6 deletions.
1 change: 1 addition & 0 deletions web/app.id.js
@@ -0,0 +1 @@
module.exports = `${new Date().getTime()}`;
76 changes: 76 additions & 0 deletions web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion web/package.json
Expand Up @@ -13,7 +13,8 @@
"ci-test": "./node_modules/mocha/bin/mocha src/test --recursive --reporter mochawesome --compilers js:babel-core/register,scss:./src/test/null-compiler --require src/test/setup.js && ./node_modules/istanbul/lib/cli.js --include-all-sources cover ./node_modules/mocha/bin/_mocha -x \"mochawesome-reports/**\" -x \"scripts/**\" -x \"bin/**\" -x \"**.conf**.js\" -x \"dist/**\" -- -R spec src/test --recursive --compilers js:babel-core/register,scss:./src/test/null-compiler --require src/test/setup.js && ./node_modules/istanbul/lib/cli.js report clover",
"ci-lint": "./node_modules/eslint/bin/eslint.js -f checkstyle src/** > reports/checkstyle-report.xml ; exit 0",
"deploy": "node ./scripts/deploy-surge.js",
"connect": "sudo docker exec -i -t xskillzv2_web_1 /bin/bash"
"connect": "sudo docker exec -i -t xskillzv2_web_1 /bin/bash",
"docker:build": "npm run build:production && docker build -t xebiafrance/skillz-web ."
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -62,6 +63,7 @@
"file-loader": "^0.9.0",
"file-saver": "^1.3.3",
"fs-extra": "^1.0.0",
"generate-file-plugin": "0.1.2",
"history": "^4.4.0",
"immutable": "^3.8.1",
"imports-loader": "^0.6.4",
Expand Down
3 changes: 2 additions & 1 deletion web/webpack/common.config.js
Expand Up @@ -15,6 +15,7 @@ const PATHS = {

process.env.BABEL_ENV = ENV;

// noinspection JSUnusedGlobalSymbols
const common = {
entry: [
PATHS.app
Expand Down Expand Up @@ -68,7 +69,7 @@ const common = {
{
test: /\.less$/,
loader: "style!css!less"
}
},
]
},

Expand Down
4 changes: 3 additions & 1 deletion web/webpack/dev.config.js
@@ -1,5 +1,6 @@
const webpack = require('webpack');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const GenerateFilePlugin = require('generate-file-plugin');

module.exports = {
devtool: 'cheap-module-eval-source-map',
Expand Down Expand Up @@ -41,6 +42,7 @@ module.exports = {
new webpack.NoErrorsPlugin(),
new webpack.ProvidePlugin({
jQuery: 'jquery'
})
}),
new GenerateFilePlugin('app.id.js'),
]
};
8 changes: 5 additions & 3 deletions web/webpack/prod.config.js
@@ -1,5 +1,6 @@
const webpack = require('webpack'),
ExtractTextPlugin = require('extract-text-webpack-plugin');
const webpack = require('webpack');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const GenerateFilePlugin = require('generate-file-plugin');

module.exports = {
devtool: 'source-map',
Expand Down Expand Up @@ -30,6 +31,7 @@ module.exports = {
compress: {
warnings: false
}
})
}),
new GenerateFilePlugin('app.id.js'),
]
};

0 comments on commit ff744b7

Please sign in to comment.