katso/brunch-config.js

70 lines
1.8 KiB
JavaScript
Raw Normal View History

2015-04-18 20:03:53 +00:00
exports.config = {
// See http://brunch.io/#documentation for docs.
files: {
javascripts: {
2015-11-28 14:27:58 +00:00
// To use a separate vendor.js bundle, specify two files path
// https://github.com/brunch/brunch/blob/stable/docs/config.md#files
joinTo: {
"js/app.js": /^(web\/static\/js\/app.js)$/,
"js/jquery.js": /^(node_modules\/jquery\/dist\/jquery\.js)$/,
"js/dygraph.js": /^(node_modules\/dygraphs\/dygraph-combined-dev\.js)$/,
"js/vendor.js": /^(web\/static\/vendor)/
}
//
// To change the order of concatenation of files, explicitly mention here
// https://github.com/brunch/brunch/tree/master/docs#concatenation
2015-04-18 20:03:53 +00:00
// order: {
// before: [
2015-11-28 14:27:58 +00:00
// "web/static/vendor/js/jquery-2.1.1.js",
// "web/static/vendor/js/bootstrap.min.js"
2015-04-18 20:03:53 +00:00
// ]
// }
},
stylesheets: {
2015-11-28 14:27:58 +00:00
joinTo: "css/app.css"
2015-04-18 20:03:53 +00:00
},
templates: {
2015-11-28 14:27:58 +00:00
joinTo: "js/app.js"
2015-04-18 20:03:53 +00:00
}
},
2015-11-28 14:27:58 +00:00
conventions: {
// This option sets where we should place non-css and non-js assets in.
// By default, we set this to "/web/static/assets". Files in this directory
// will be copied to `paths.public`, which is "priv/static" by default.
assets: /^(web\/static\/assets)/
},
2015-04-18 20:03:53 +00:00
// Phoenix paths configuration
paths: {
2015-11-28 14:27:58 +00:00
// Dependencies and current project directories to watch
watched: [
"deps/phoenix/web/static",
"deps/phoenix_html/web/static",
"web/static",
"test/static"
],
2015-04-18 20:03:53 +00:00
// Where to compile files to
public: "priv/static"
},
// Configure your plugins
plugins: {
2015-11-28 14:27:58 +00:00
babel: {
2015-04-18 20:03:53 +00:00
// Do not use ES6 compiler in vendor code
2015-11-28 14:27:58 +00:00
ignore: [/web\/static\/vendor/]
2015-04-18 20:03:53 +00:00
}
2015-11-28 14:27:58 +00:00
},
modules: {
autoRequire: {
"js/app.js": ["web/static/js/app"]
}
},
npm: {
enabled: true
2015-04-18 20:03:53 +00:00
}
};