Skip to content
Open
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
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,17 @@
"node-red": "^0.13.3",
"node-red-contrib-pubnub": "0.0.3",
"sass-brunch": "^1.9.2",
"uglify-js-brunch": "^1.7.8"
"uglify-js-brunch": "^1.7.8",
"webpack": "^1.12.14",
"webpack-dev-server": "^1.14.1"
},
"scripts": {
"test": "mocha -r mock-local-storage -r test/global --recursive --compilers js:babel-register",
"start": "http-server -a 0.0.0.0 -p 9000",
"simu": "node-red -u ./simu/ -s ./simu/settings.js -v",
"docs": "docco app/js/**/*.*",
"lint": "./node_modules/eslint/bin/eslint.js --cache --fix ./app"
"lint": "./node_modules/eslint/bin/eslint.js --cache --fix ./app",
"watch": "webpack --watch"
},
"repository": {
"type": "git",
Expand Down
31 changes: 31 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
var path = require('path');
var webpack = require('webpack');

module.exports = {
entry: './app/js/lora.js',
output: {
path: __dirname,
filename: 'bundle.js'
},
module: {
loaders: [
{
loader: 'babel-loader',
test: path.join(__dirname, 'app/js'),
query: {
presets: 'es2015',
},
}
]
},
plugins: [
// Avoid publishing files when compilation fails
new webpack.NoErrorsPlugin()
],
stats: {
// Nice colored output
colors: true
},
// Create Sourcemaps for the bundle
devtool: 'source-map',
};