Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Adjust build output directories #2630

Merged
merged 1 commit into from
Oct 14, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions js/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
coverage
node_modules
npm-debug.log
build
.build
.coverage
.happypack
2 changes: 2 additions & 0 deletions js/.istanbul.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ instrumentation:
root: src
extensions:
- .js
reporting:
dir: ./.coverage
5 changes: 4 additions & 1 deletion js/scripts/release.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#!/bin/bash

# find the build destimation
DEST=${BUILD_DEST:=.build}

# change into the js directory (one down from scripts)
pushd `dirname $0`
cd ../build
cd ../$DEST

# variables
UTCDATE=`date -u "+%Y%m%d-%H%M%S"`
Expand Down
7 changes: 4 additions & 3 deletions js/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const WebpackErrorNotificationPlugin = require('webpack-error-notification');

const ENV = process.env.NODE_ENV || 'development';
const isProd = ENV === 'production';
const DEST = process.env.BUILD_DEST || '.build';

module.exports = {
debug: !isProd,
Expand All @@ -44,7 +45,7 @@ module.exports = {
'index': ['./index.js']
},
output: {
path: path.join(__dirname, 'build'),
path: path.join(__dirname, DEST),
filename: '[name].js'
},
module: {
Expand Down Expand Up @@ -138,7 +139,7 @@ module.exports = {
}),
new webpack.DllReferencePlugin({
context: '.',
manifest: require('./build/vendor-manifest.json')
manifest: require(`./${DEST}/vendor-manifest.json`)
}),

new WebpackErrorNotificationPlugin(),
Expand Down Expand Up @@ -191,7 +192,7 @@ module.exports = {
return plugins;
}()),
devServer: {
contentBase: './build',
contentBase: `./${DEST}`,
historyApiFallback: false,
quiet: false,
hot: !isProd,
Expand Down
5 changes: 3 additions & 2 deletions js/webpack.vendor.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const webpack = require('webpack');

const ENV = process.env.NODE_ENV || 'development';
const isProd = ENV === 'production';
const DEST = process.env.BUILD_DEST || '.build';

let modules = [
'babel-polyfill',
Expand Down Expand Up @@ -47,14 +48,14 @@ module.exports = {
},
output: {
filename: '[name].js',
path: 'build/',
path: `${DEST}/`,
library: '[name]_lib'
},
plugins: (function () {
const plugins = [
new webpack.DllPlugin({
name: '[name]_lib',
path: 'build/[name]-manifest.json'
path: `${DEST}/[name]-manifest.json`
}),

new webpack.DefinePlugin({
Expand Down