Created
May 5, 2016 15:25
-
-
Save anonymous/da4d19da66223bd85c602fc987c618b1 to your computer and use it in GitHub Desktop.
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 = { | |
files: { | |
javascripts: { | |
joinTo: { | |
"js/front.js": /^(web\/static\/js\/front)/, | |
"js/admin.js": /^(web\/static\/js\/admin)/ | |
} | |
}, | |
stylesheets: { | |
joinTo: { | |
"css/front.css": /^(web\/static\/css\/front)/, | |
"css/admin.css": /^(web\/static\/css\/admin)/ | |
} | |
} | |
}, | |
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)/ | |
}, | |
// Phoenix paths configuration | |
paths: { | |
// Dependencies and current project 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/] | |
}, | |
sass: { | |
options: { | |
includePaths: ["node_modules/bootstrap-sass/assets/stylesheets"], | |
precision: 8 // minimum precision required by bootstrap-sass | |
} | |
}, | |
copycat: { | |
"fonts": ["node_modules/bootstrap-sass/assets/fonts/bootstrap"] // copy node_modules/bootstrap-sass/assets/fonts/bootstrap/* to priv/static/fonts/ | |
} | |
}, | |
modules: { | |
autoRequire: { | |
"js/front.js": [ | |
"web/static/js/front" | |
], | |
"js/admin.js": [ | |
"web/static/js/admin" | |
] | |
} | |
}//, | |
// npm: { | |
// enabled: true, | |
// // Whitelist the npm deps to be pulled in as front-end assets. | |
// // All other deps in package.json will be excluded from the bundle. | |
// whitelist: ["phoenix", "phoenix_html", "jquery", "bootstrap-sass"], | |
// globals: { // bootstrap-sass' JavaScript requires both '$' and 'jQuery' in global scope | |
// $: 'jquery', | |
// jQuery: 'jquery' | |
// } | |
// } | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment