Initial build infrastructure
This commit is contained in:
commit
b5d7041f97
4 changed files with 40 additions and 0 deletions
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
/build
|
||||||
|
/node_modules
|
17
package.json
Normal file
17
package.json
Normal 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
3
src/app.coffee
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
lodash = require 'lodash'
|
||||||
|
|
||||||
|
document.write '<h1>Hello</h1>'
|
18
webpack.config.js
Normal file
18
webpack.config.js
Normal 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']
|
||||||
|
}
|
||||||
|
};
|
Reference in a new issue