From 53711966d2bbde333f8487e42810d4e5d28fbf68 Mon Sep 17 00:00:00 2001 From: orangemug Date: Thu, 6 Jul 2017 19:53:39 +0100 Subject: [PATCH 1/2] Added circleci build artifacts. --- circle.yml | 4 ++++ config/webpack.production.config.js | 10 +++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 circle.yml diff --git a/circle.yml b/circle.yml new file mode 100644 index 0000000..08d035d --- /dev/null +++ b/circle.yml @@ -0,0 +1,4 @@ +machine: + node: + version: 6 + diff --git a/config/webpack.production.config.js b/config/webpack.production.config.js index 9f5a5e1..66d582c 100644 --- a/config/webpack.production.config.js +++ b/config/webpack.production.config.js @@ -6,6 +6,14 @@ var ExtractTextPlugin = require('extract-text-webpack-plugin'); var HtmlWebpackPlugin = require('html-webpack-plugin'); var WebpackCleanupPlugin = require('webpack-cleanup-plugin'); +var OUTPATH; +if(process.env.CIRCLE_ARTIFACTS) { + OUTPATH = path.join(process.env.CIRCLE_ARTIFACTS, "build"); +} +else { + OUTPATH = path.join(__dirname, '..', 'public'); +} + module.exports = { entry: { app: './src/index.jsx', @@ -32,7 +40,7 @@ module.exports = { ] }, output: { - path: path.join(__dirname, '..', 'public'), + path: OUTPATH, filename: '[name].[chunkhash].js', chunkFilename: '[chunkhash].js' }, From 0005698c107db85f9ce6754fb0f0b7045ffce552 Mon Sep 17 00:00:00 2001 From: orangemug Date: Thu, 6 Jul 2017 19:59:12 +0100 Subject: [PATCH 2/2] Added build to post test step. --- circle.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index 08d035d..5e66cd3 100644 --- a/circle.yml +++ b/circle.yml @@ -1,4 +1,6 @@ machine: node: version: 6 - +test: + post: + - npm run build