Skip to content

Commit

Permalink
ui: Add a webpack config
Browse files Browse the repository at this point in the history
  • Loading branch information
jonnor committed Apr 12, 2017
1 parent 071ea2b commit f627302
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
3 changes: 3 additions & 0 deletions browser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
"stats": require('./src/stats')
};
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"test": "mocha --reporter spec --compilers .coffee:coffee-script/register tests/*.coffee",
"start": "msgflo --ignore store --graph graphs/imageresize.fbp",
"postinstall": "msgflo-procfile --ignore store graphs/imageresize.fbp > Procfile",
"build": "webpack --config webpack.config.js",
"setup": "msgflo-setup --participants=true --ignore store graphs/imageresize.fbp"
},
"msgflo": {
Expand Down Expand Up @@ -56,6 +57,8 @@
"devDependencies": {
"arrivals": "^2.1.0",
"chai": "^3.5.0",
"mocha": "^3.2.0"
"coffee-loader": "^0.7.3",
"mocha": "^3.2.0",
"webpack": "^2.3.3"
}
}
26 changes: 26 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
var path = require("path");
module.exports = {
entry: './browser.js',
output: {
path: path.join(__dirname, "assets"),
publicPath: "assets/",
filename: "imageresize.js",
library: 'imageresize',
libraryTarget: 'umd'
},
externals: {
},
node: {
'fs': 'empty',
'tls': 'empty',
'net': 'empty'
},
module: {
loaders: [
{ test: /\.coffee$/, loader: "coffee-loader" },
]
},
resolve: {
extensions: [".coffee", ".js"]
},
};

0 comments on commit f627302

Please sign in to comment.