Skip to content

Commit

Permalink
use jsio-webpack for building
Browse files Browse the repository at this point in the history
  • Loading branch information
yofreke committed Sep 23, 2016
1 parent 1ea34f2 commit 0fedb8b
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 103 deletions.
50 changes: 50 additions & 0 deletions jsio-webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
'use strict';
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');

const NODE_ENV = process.env.NODE_ENV || 'development';


const configure = (configurator, options) => {
configurator.merge({
entry: {
clmtrackr: path.resolve(__dirname, 'js'),
examples: path.resolve(__dirname, 'examples')
},
output: {
filename: '[name].js',
path: path.resolve(__dirname, 'dist'),
publicPath: NODE_ENV === 'production' ? '/clmtrackr/' : '/',
libraryTarget: 'umd',
library: 'clm'
},
resolve: {
alias: {
'clmtrackr': path.resolve(__dirname),
'stats.js': path.resolve(__dirname, 'lib', 'stats.js')
}
}
});

configurator.plugin('htmlWebpack', HtmlWebpackPlugin, [{
title: 'Clmtrackr Examples',
template: path.resolve(__dirname, 'examples', 'index.html'),
chunks: ['examples']
}]);

// Use normal style-loader for stylus
options.noStylusExtractText = true;

return configurator;
};


const postConfigure = (configurator, options) => {
configurator.removePreLoader('eslint');
};


module.exports = {
configure: configure,
postConfigure: postConfigure
};
22 changes: 5 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"version": "0.0.1",
"description": "Javascript library for precise tracking of facial features via Constrained Local Models",
"scripts": {
"build": "NODE_ENV=production webpack --optimize-minimize --optimize-dedupe",
"watch": "webpack --debug --devtool eval-source-map --output-pathinfo --progress --colors --watch",
"serve": "webpack-dev-server --debug --devtool eval-source-map --output-pathinfo --inline --hot --host localhost",
"build": "NODE_ENV=production jsio-webpack",
"watch": "jsio-webpack --watch",
"serve": "jsio-webpack serve --hot",
"clean": "rm -rf dist",
"postinstall": "typings install && npm run build",
"publish": "./publish.sh",
Expand All @@ -17,29 +17,17 @@
"url": "https://github.com/auduno/clmtrackr.git"
},
"devDependencies": {
"babel-core": "^6.14.0",
"babel-loader": "^6.2.5",
"babel-preset-es2015": "^6.14.0",
"blob.js": "andyinabox/Blob.js",
"exdat": "^0.6.2",
"file-loader": "^0.9.0",
"filesaver.js": "andyinabox/FileSaver.js",
"getusermedia": "^1.3.5",
"gh-pages": "^0.11.0",
"glsl-template-loader": "git+https://github.com/jsio-private/glsl-template-loader#0c1b2cbaa6b1020de78527b37dcd2ce51a5e89bc",
"html-webpack-plugin": "^2.22.0",
"json-loader": "^0.5.4",
"jsio-webpack": "git+https://github.com/jsio-private/jsio-webpack#0b04c5a15c066bb2c5209144cb14afa8d43e224e",
"raf": "^3.1.0",
"stylus": "^0.54.5",
"stylus-loader": "^2.3.1",
"ts-loader": "^0.8.2",
"twgl.js": "^1.9.0",
"typescript": "^1.8.10",
"typings": "^1.3.3",
"uglify": "^0.1.5",
"webpack": "^1.13.2",
"webpack-dev-server": "^1.15.1",
"worker-loader": "^0.7.1"
"uglify": "^0.1.5"
},
"dependencies": {
"classnames": "^2.2.5",
Expand Down
86 changes: 0 additions & 86 deletions webpack.config.js

This file was deleted.

0 comments on commit 0fedb8b

Please sign in to comment.