-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
consistent concat order #25
Comments
This would def be good to have. Was trying this out and included gulp-hogan to precompile mustache templates. No matter what I did the compiled templates were at the bottom of the file which was problematic |
Every time my js bundles are built the script load order changes. Sometimes this causes errors and causes the app to fail |
Thinking through the config that would represent this feature... what do people think about this?: // bundle.config.js
header: {
scripts: [
{
src: './bower_components/jquery/dist/jquery.js',
minSrc: './bower_components/jquery/dist/jquery.min.js'
},
'./vendor/*.js',
'./content/*.coffee',
'./content/*.js'
],
styles: [
//...
],
options: {
order: {
scripts: [
'always-first.js', // from /content/*.js
'jquery*.js', // depending on env, this could be streaming min or non-min file so use wildcard
'lodash.js', // from /vendor
'file1.js', // compiled from file1.coffee
'file2.js', // compiled from file2.coffee
'!always-last.js', // everything else except always-last.js
'always-last.js' // from /content/*.js
],
styles: [
//...
]
}
}
} The config is based off what |
That looks great to me. Pretty easy to understand too |
Config option to allow consistent bundle file content ordering. Fixes #25
@RyanS @timelf123 can you pull down |
Right now, custom transforms can cause the files in stream to stream through in a seaminly random order. Perhaps use something like gulp-order to make this deterministic: https://www.npmjs.org/package/gulp-order
The text was updated successfully, but these errors were encountered: