Skip to content

Instantly share code, notes, and snippets.

@andreapavoni
Last active January 28, 2016 09:07
Show Gist options
  • Save andreapavoni/22472f5eb9502f7a3c4f to your computer and use it in GitHub Desktop.
Save andreapavoni/22472f5eb9502f7a3c4f to your computer and use it in GitHub Desktop.
exports.config = {
optimize: false,
sourceMaps: true,
files: {
javascripts: {
joinTo: "js/app.dev.js"
},
stylesheets: {
joinTo: "css/app.dev.css",
},
},
conventions: {
// This option sets where we should place non-css and non-js assets in.
assets: /^(web\/static\/assets)/
},
// Phoenix paths configuration
paths: {
// Dependencies and current project directories to watch
watched: [
"deps/phoenix/web/static",
"deps/phoenix_html/web/static",
"web/static",
"test/static"
],
// Where to compile files to
public: "priv/static"
},
// Configure your plugins
plugins: {
babel: {
presets: ['react', 'es2015'],
// Do not use ES6 compiler in vendor code
ignore: [/web\/static\/vendor/]
},
sass: {
mode: 'native' // Use libsass. Change to 'ruby' to use the gem
},
uglify: {
mangle: false,
compress: false,
}
},
modules: {
autoRequire: {
"js/app.dev.js": ["web/static/js/app"]
}
},
// Production settings
overrides: {
production: {
optimize: true,
sourceMaps: false,
plugins: {
uglify: {
compress: true,
mangle: true
}
},
files: {
javascripts: {
joinTo: "js/app.prod.js"
},
stylesheets: {
joinTo: "css/app.prod.css",
},
},
modules: {
autoRequire: {
"js/app.prod.js": ["web/static/js/app"]
}
},
},
},
npm: {
enabled: true
}
};
{
"name": "",
"version": "1.0.0",
"description": "",
"directories": {
"test": "test"
},
"repository": {},
"scripts": {
"build": "brunch build",
"prod": "brunch build --production",
"watch": "brunch watch",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Andrea Pavoni",
"license": "",
"dependencies": {
"react": "^0.14.6",
"react-dom": "^0.14.6"
},
"devDependencies": {
"babel-brunch": "^6.0.0",
"babel-core": "^6.4.0",
"babel-preset-es2015": "^6.3.13",
"babel-preset-react": "^6.3.13",
"brunch": "^2.0.0",
"javascript-brunch": ">= 1.0 < 1.8",
"sass-brunch": "^1.9.2",
"uglify-js-brunch": ">= 1.0 < 1.8"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment