From b5d7041f97303dbddad9d69f47fcde6277a8a4c9 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 5 Jan 2016 11:57:23 +0100 Subject: Initial build infrastructure --- .gitignore | 2 ++ package.json | 17 +++++++++++++++++ src/app.coffee | 3 +++ webpack.config.js | 18 ++++++++++++++++++ 4 files changed, 40 insertions(+) create mode 100644 .gitignore create mode 100644 package.json create mode 100644 src/app.coffee create mode 100644 webpack.config.js diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7d5b7a9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/build +/node_modules diff --git a/package.json b/package.json new file mode 100644 index 0000000..ca3a794 --- /dev/null +++ b/package.json @@ -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" + } +} diff --git a/src/app.coffee b/src/app.coffee new file mode 100644 index 0000000..08c8575 --- /dev/null +++ b/src/app.coffee @@ -0,0 +1,3 @@ +lodash = require 'lodash' + +document.write '

Hello

' diff --git a/webpack.config.js b/webpack.config.js new file mode 100644 index 0000000..20a6165 --- /dev/null +++ b/webpack.config.js @@ -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'] + } +}; -- cgit v1.2.3