Created
July 28, 2015 15:32
-
-
Save paulcsmith/382f67900c9d71b3aa03 to your computer and use it in GitHub Desktop.
Using nice import syntax using Phoenix and Brunch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.config = { | |
// See http://brunch.io/#documentation for docs. | |
files: { | |
javascripts: { | |
joinTo: 'js/app.js', | |
// 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)/, | |
// 'js/vendor.js': /^(web\/static\/vendor)/ | |
// } | |
// | |
// To change the order of concatenation of files, explictly mention here | |
// https://github.com/brunch/brunch/tree/master/docs#concatenation | |
// order: { | |
// before: [ | |
// 'web/static/vendor/js/jquery-2.1.1.js', | |
// 'web/static/vendor/js/bootstrap.min.js' | |
// ] | |
// } | |
order: { | |
before: [ | |
/^bower_components/, | |
/^web\/static\/vendor/ | |
] | |
} | |
}, | |
stylesheets: { | |
joinTo: 'css/app.css' | |
}, | |
templates: { | |
joinTo: 'js/app.js' | |
} | |
}, | |
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)/, | |
vendor: [/^(web\/static\/vendor)/] | |
}, | |
// Phoenix paths configuration | |
paths: { | |
// Which directories to watch | |
watched: ["web/static", "test/static"], | |
// Where to compile files to | |
public: "priv/static" | |
}, | |
// Configure your plugins | |
plugins: { | |
babel: { | |
// Do not use ES6 compiler in vendor code | |
ignore: [/^(web\/static\/vendor)|(bower_components)/] | |
} | |
}, | |
npm: { | |
enabled: true | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment