Permalink
Browse files

Replace brunch with webpack

  • Loading branch information...
bigardone committed Apr 26, 2016
1 parent 748f978 commit ecec13cca08859e704563d83d96fa18500e7a2e4
Showing with 45 additions and 81 deletions.
  1. +0 −72 brunch-config.js
  2. +1 −1 config/dev.exs
  3. +11 −8 package.json
  4. +33 −0 webpack.config.js
View

This file was deleted.

Oops, something went wrong.
View
@@ -11,7 +11,7 @@ config :phoenix_template, PhoenixTemplate.Endpoint,
debug_errors: true,
code_reloader: true,
check_origin: false,
watchers: [node: ["node_modules/brunch/bin/brunch", "watch", "--stdin"]]
watchers: [node: ["node_modules/webpack/bin/webpack.js", "--watch", "--color"]]
# Watch static and templates for browser reloading.
config :phoenix_template, PhoenixTemplate.Endpoint,
View
@@ -1,14 +1,17 @@
{
"repository": {
},
"repository": {},
"dependencies": {
"babel-brunch": "~6.0.0",
"brunch": "~2.1.3",
"clean-css-brunch": "~1.8.0",
"css-brunch": "~1.7.0",
"javascript-brunch": "~1.8.0",
"uglify-js-brunch": "~1.7.0",
"phoenix": "file:deps/phoenix",
"phoenix_html": "file:deps/phoenix_html"
},
"devDependencies": {
"babel-core": "^6.7.7",
"babel-loader": "^6.2.4",
"babel-preset-es2015": "^6.6.0",
"copy-webpack-plugin": "^2.1.3",
"css-loader": "^0.23.1",
"extract-text-webpack-plugin": "^1.0.1",
"style-loader": "^0.13.1",
"webpack": "^1.13.0"
}
}
View
@@ -0,0 +1,33 @@
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = {
entry: [
'./web/static/js/app.js',
'./web/static/css/app.css',
],
output: {
path: './priv/static',
filename: 'js/app.js',
},
module: {
loaders: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel',
query: {
presets: ['es2015'],
},
},
{
test: /\.css$/,
loader: ExtractTextPlugin.extract('style', 'css'),
},
],
},
plugins: [
new ExtractTextPlugin('css/app.css'),
new CopyWebpackPlugin([{ from: './web/static/assets' }]),
],
};

0 comments on commit ecec13c

Please sign in to comment.