-
-
Save schinsue/04a183908dc8fbe425a8a0ad92f36da9 to your computer and use it in GitHub Desktop.
Phoenix brunch config which just make sense
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
import "phoenix_html" | |
import "bootstrap" | |
import "jquery" | |
import "toastr" | |
// ... |
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
$icon-font-path: "/fonts/"; | |
@import "variables"; | |
@import "bootstrap"; | |
@import "font-awesome"; | |
@import "toastr"; | |
// ... |
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/app.js" | |
}, | |
stylesheets: { | |
joinTo: "css/app.css", | |
order: { | |
after: ["web/static/css/app.css"] // concat app.css last | |
} | |
}, | |
templates: { | |
joinTo: "js/app.js" | |
} | |
}, | |
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: [ | |
"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)|node_modules/] | |
}, | |
sass: { | |
options: { | |
includePaths: [ | |
"node_modules/bootstrap-sass/assets/stylesheets", | |
"node_modules/font-awesome/scss", | |
"node_modules/toastr" | |
], // tell sass-brunch where to look for files to @import | |
}, | |
precision: 8 // minimum precision required by bootstrap-sass | |
}, | |
copycat: { | |
"fonts": [ | |
"node_modules/bootstrap-sass/assets/fonts/bootstrap", | |
"node_modules/font-awesome/fonts" | |
] // copy these files into priv/static/fonts/ | |
} | |
}, | |
modules: { | |
autoRequire: { | |
"js/app.js": [ | |
"web/static/js/app", | |
"web/static/js/theme-app" | |
] | |
} | |
}, | |
npm: { | |
enabled: true, | |
globals: { | |
$: 'jquery', | |
jQuery: 'jquery' | |
}, | |
styles: { | |
"bootstrap-table": ["dist/bootstrap-table.css"], | |
"jquery-ui": ["themes/base/all.css"] | |
} // included these styles into the build | |
} | |
} |
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
{ | |
"name": "phoenix-brunch-example", | |
"version": "0.0.1", | |
"author": { | |
"name": "Tai An Su", | |
"email": "[email protected]" | |
}, | |
"dependencies": { | |
"autoprefixer": "^6.4.0", | |
"babel-brunch": "^6.0.5", | |
"bootstrap-sass": "^3.3.6", | |
"bootstrap-table": "*", | |
"brunch": "^2.8.2", | |
"clean-css-brunch": "*", | |
"css-brunch": "*", | |
"font-awesome": "^4.6.3", | |
"javascript-brunch": "*", | |
"jquery": "^2.2.1", | |
"jquery-ui": "^1.11.4", | |
"phoenix": "file:deps/phoenix", | |
"phoenix_html": "file:deps/phoenix_html", | |
"postcss-brunch": "^0.6.0", | |
"sass-brunch": "*", | |
"toastr": "^2.1.2", | |
"uglify-js-brunch": "*" | |
}, | |
"devDependencies": { | |
"babel-preset-es2015": "^6.13.2" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment