Added circleci build artifacts.

This commit is contained in:
orangemug 2017-07-06 19:53:39 +01:00
parent 040d585d57
commit 53711966d2
2 changed files with 13 additions and 1 deletions

4
circle.yml Normal file
View file

@ -0,0 +1,4 @@
machine:
node:
version: 6

View file

@ -6,6 +6,14 @@ var ExtractTextPlugin = require('extract-text-webpack-plugin');
var HtmlWebpackPlugin = require('html-webpack-plugin'); var HtmlWebpackPlugin = require('html-webpack-plugin');
var WebpackCleanupPlugin = require('webpack-cleanup-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 = { module.exports = {
entry: { entry: {
app: './src/index.jsx', app: './src/index.jsx',
@ -32,7 +40,7 @@ module.exports = {
] ]
}, },
output: { output: {
path: path.join(__dirname, '..', 'public'), path: OUTPATH,
filename: '[name].[chunkhash].js', filename: '[name].[chunkhash].js',
chunkFilename: '[chunkhash].js' chunkFilename: '[chunkhash].js'
}, },