added webpack setup

master
Christian Dreier 2017-05-25 19:21:25 +02:00
parent 9952509a9e
commit 86c3d4383d
6 changed files with 2901 additions and 1 deletions

4
.babelrc 100644
View File

@ -0,0 +1,4 @@
{
"presets": ["es2015"],
"plugins": []
}

1
.gitignore vendored 100644
View File

@ -0,0 +1 @@
node_modules

View File

@ -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>

23
package.json 100644
View File

@ -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"
}
}

17
webpack.config.js 100644
View File

@ -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"
}
]
}
}

2855
yarn.lock 100644

File diff suppressed because it is too large Load Diff