Open abarganier opened 8 years ago
I think I've found your problem... Here's a snippet from your output of console.log(files)
:
'!assets/**/*.js', // <- this removes all *.js-files in the assets-dir
'scripts/*.js',
'scripts/**/*.js',
'assets/plugins/ng-signature-pad-master/dist/ng-signature-pad.min.js', // <- this is a *.js file in the assets-dir
For me it seems that those patterns could be in conflict an the former (the negated one) wins in that case. But I'm not sure if it works like that, please verify by removing the !assets/**/*.js
line and try again.
Thanks for the reply, sorry for the late response I was on vacation. I will try this and get back to you, looks promising though!
I've been using this plugin for a while now and I love it. Unfortunately over the past month or so I've noticed some issues begin to pop up.
Case 1:
We have an angular application where we're injecting JS
<script>
tags and CSS<link>
tags from various sources. Our directory structure looks something like...Directory Structure:
Most of our libs are handled via bower. However, we have one library that we customized that we keep in
assets/plugins/pluginName/
. All of these exceptassets/plugins/pluginName/
inject into theindex.html
without issue. But that one plugin... It won't inject. Oddly enough, if we throw apluginName.css
intoassets/plugins/pluginName/
, it injects without issue. The problem is specific to.js
files in the directory.gulpfile.js (some tasks omitted that are irrelevant to this build process)
:Note we're logging the
files
array in theinject
task to console, and then also printing out the result of passingfiles
togulp.src()
. Here's that output...Console output:
Here's what the index looks like.
index.html
The file
assets/plugins/ng-signature-pad-master/dist/ng-signature-pad.min.js
is the culprit. You can see it's included in the files array, but it doesn't get pulled into the vinyl-stream. I can verify that the file is indeed copied over intobuild/assets/plugins/ng-signature-pad-master/dist/
in the copy task.Any idea on what could be causing this?
Case 2:
Additionally, another project with a very similar directory structure has stopped injecting the
templates-app.js
file output by thehtml2js
task. I'll post itsgulpfile.js
below. In this case it was working for quite some time, and then it stopped working out of the blue. I ran a build and it worked. When I ran the build task again, it no longer was injecting. It was working without issue for over a month prior to the problem arising, and thegulpfile.js
was not touched. I'll post that project'sgulpfile.js
below as well. The index.html for this project is almost the same as that above.gulpfile.js
This one puzzles me even more since the issue appeared out of the blue. Any ideas on this one as well? In the meantime we're putting static script tags in.