Skip to content

Commit

Permalink
add build to postinstall, production build goes to `dist/clmtrackr.js…
Browse files Browse the repository at this point in the history
…` instead of min
  • Loading branch information
yofreke committed Sep 12, 2016
1 parent d6c7ec9 commit cd36b71
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
"version": "0.0.1",
"description": "Javascript library for precise tracking of facial features via Constrained Local Models",
"scripts": {
"build": "PROD_ENV=1 webpack --optimize-minimize --optimize-dedupe",
"build": "webpack --optimize-minimize --optimize-dedupe",
"watch": "webpack --debug --devtool eval-cheap-module-source-map --output-pathinfo --progress --colors --watch",
"serve": "webpack-dev-server --debug --devtool eval-cheap-module-source-map --output-pathinfo --inline --hot --host localhost",
"clean": "rm -rf dist"
"clean": "rm -rf dist",
"postinstall": "npm run build"
},
"main": "dist/clmtracker.js",
"repository": {
Expand Down
4 changes: 1 addition & 3 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
'use strict';
const path = require('path');

const PROD = JSON.parse(process.env.PROD_ENV || '0');

module.exports = {
entry: {
clmtrackr: './js/index.js'
},
output: {
filename: PROD ? '[name].min.js' : '[name].js',
filename: '[name].js',
path: path.resolve(__dirname, 'dist'),
publicPath: '/dist/',
libraryTarget: 'umd',
Expand Down

0 comments on commit cd36b71

Please sign in to comment.