-
Notifications
You must be signed in to change notification settings - Fork 93
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
additionalStreams not working #200
Comments
Here's an example run output with the full error and calls to gulp-debug in place, one at the end of the 'templateStream' pipeline and another right after the call to gulp-useref:
|
Possibly related; it's also worth noting that the current unit test for this functionality seems to fail intermittently.
Running the tests a few times in a row should let you see this occur. |
|
Moved from #139 |
Moved from #139 "When I add additionalStreams it immediately stops concatenate files, just copy them" "version": "3.0.8" |
Anybody having this issue want to try installing older versions of the plugin and see which is the most recent one that works? |
@forty8bits that issue was fixed. The test was dependent on the order of the files which is not being preserved. |
There is a new version, 3.1.0. Does the new version have the same issues? |
If no one with this issue wants to follow up on this and help test, I might as well close it. |
@jonkemp: The It may also be worth noting that the single file contained in the additional stream is showing up twice in gulp-debug directly after the gulp-useref step. I'll try to dig into this further, although I may not get a chance until the end of next week. |
I can also confirm that on 3.1.0 when using |
Everything starts working fine for me once I remove lines 13-16 in // if we added additional files, reorder the stream
if (additionalFiles.length > 0) {
source = reorderTheStream.call(self, globs, src);
} The I'm not sure what's the purpose of reordering files here, but if I remove it, everything works fine for me. I can still reorder resulting files before concat using a transform stream: return gulp.src('app/index.html')
.pipe(wiredep())
.pipe(useref({
searchPath: 'app',
noconcat: false,
additionalStreams: [templateCacheStream()]
},
compileSass(),
compileScripts(),
reorderScripts()
))
function reorderScripts () {
return lazypipe()
// gulp-order sorts files alphabetically. Bower files shouldn't be sorted because
// they are placed by wiredep in order of what depends on what.
// So we're using gulp-if here to run gulp-order only on files in cwd, and not
// on files in ../bower_components
.pipe(function () {
return gulpif('**/*.js', order([
'templates.js',
'app.js',
'**/*.js'
]))
})
} Is this a good enough solution? Would you accept a PR? |
Update: there's also an issue that files added via This is easily fixed by passing current file type in If these two comments sound good, I'm gonna make a PR. |
PR sounds good but I would also like a failing unit test before adding a fix. |
I'm having issues combining the use of this plugin along with gulp-angular-templatecache as well. Has this PR been considered for acceptance? |
The PR was never made. I wasn't aware of this fork. My comments above are still valid. |
Given the below code, which I've simplified to make more readable:
I'm getting a
File not found with singular glob
error, specifying the full absolute path of the 'app/app.templates.js' file.I can't seem to figure out what exactly is going wrong; through inserting a few calls to gulp-debug I can see that the app.templates.js file appears to be getting passed along with the expected cwd, base and path properties.
The text was updated successfully, but these errors were encountered: