Initial build infrastructure

This commit is contained in:
Matthias Schiffer 2016-01-05 11:57:23 +01:00
commit b5d7041f97
4 changed files with 40 additions and 0 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
/build
/node_modules

17
package.json Normal file
View file

@ -0,0 +1,17 @@
{
"private": true,
"scripts": {
"start": "webpack-dev-server -d",
"build": "webpack"
},
"devDependencies": {
"coffee-loader": "^0.7.2",
"coffee-script": "^1.10.0",
"html-webpack-plugin": "^1.7.0",
"webpack": "^1.12.9",
"webpack-dev-server": "^1.14.0"
},
"dependencies": {
"lodash": "^3.10.1"
}
}

3
src/app.coffee Normal file
View file

@ -0,0 +1,3 @@
lodash = require 'lodash'
document.write '<h1>Hello</h1>'

18
webpack.config.js Normal file
View file

@ -0,0 +1,18 @@
var HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: './src/app.coffee',
output: {
path: './build',
filename: 'bundle.js'
},
plugins: [new HtmlWebpackPlugin()],
module: {
loaders: [
{ test: /\.coffee$/, loader: 'coffee-loader' }
]
},
resolve: {
extensions: ['', '.js', '.json', '.coffee']
}
};