added webpack setup
parent
9952509a9e
commit
86c3d4383d
|
|
@ -0,0 +1 @@
|
||||||
|
node_modules
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<html>
|
<html>
|
||||||
<body>
|
<body>
|
||||||
<canvas id="canvas" width="400" height="600" style="border: 1px solid #333"></canvas>
|
<canvas id="canvas" width="400" height="600" style="border: 1px solid #333"></canvas>
|
||||||
<script src="main.js"></script>
|
<script src="http://localhost:8080/dist/bundle.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
"name": "flappydojo",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "",
|
||||||
|
"main": "main.js",
|
||||||
|
"scripts": {
|
||||||
|
"start": "webpack-dev-server --watch --inline --colors --port 8080",
|
||||||
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git@gitea.drailing.net:dreiling/flappyDojo.git"
|
||||||
|
},
|
||||||
|
"author": "",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"babel-core": "^6.24.1",
|
||||||
|
"babel-loader": "^7.0.0",
|
||||||
|
"babel-preset-es2015": "^6.24.1",
|
||||||
|
"webpack": "^2.6.1",
|
||||||
|
"webpack-dev-server": "^2.4.5"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
module.exports = {
|
||||||
|
entry: "./main.js",
|
||||||
|
output: {
|
||||||
|
path: __dirname + "/dist",
|
||||||
|
filename: "bundle.js",
|
||||||
|
publicPath: "/dist/"
|
||||||
|
},
|
||||||
|
module: {
|
||||||
|
loaders: [
|
||||||
|
{
|
||||||
|
test: /\.js$/,
|
||||||
|
exclude: /node_modules/,
|
||||||
|
loader: "babel-loader"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue