Closed bogdancss closed 6 years ago
Try running the following command to install a library and include it in the devDependencies:
bower install --save-dev some-lib.js
Then check it after running the gulp build, gulp wiredep or even the gulp serve
nope - tried that as well. After installing a lib with --save-dev
has the same result as with --save
. Running any of the build
, wiredep
or serve
commands, removes the path to the js file from <!-- build:js scripts/vendor.js --> <!-- bower:js -->
section.
After building, I run gulp serve:dist
and check the vendor.js
file - the new lib is not there either
You can try a workaround, by adding the library manually after the <!-- endbower -->
and before the <!-- endbuild -->
nice - that worked. thank you. Is there a way to modify the gulpfile
to add the path to the new lib automatically to the index?
could you please tell about which library you need to include, some of the libraries have an issue that the bower not include even if it is included in the bower.json file, and this may require an update at the library bower json file itself in the bower_components folder
it's ShuffleJS
. I checked the lib folder and there is no bower.json
file, however, there is a .bower.json
(preceding dot) with these contents:
{
"name": "shufflejs",
"homepage": "https://github.com/Vestride/Shuffle",
"version": "5.0.3",
"_release": "5.0.3",
"_resolution": {
"type": "version",
"tag": "v5.0.3",
"commit": "068c8acf9fe4ae6d5de6b2ffe16f6ededc84d14c"
},
"_source": "https://github.com/Vestride/Shuffle.git",
"_target": "^5.0.3",
"_originalSource": "shufflejs",
"_direct": true
}
All bower components installed is injected using the gulp wiredep task.
some components bower json files should be updated, please check that issue and how the developer make the workaround solution by updating the component bower json file https://github.com/yeoman/generator-angular/issues/1325
Added a new 3rd party lib using
bower install --save some-lib.js
. This adds it to thebower.json
file but that's it. I can add it manually toindex.html
:As soon as I run
gulp build
,gulp wiredep
orgulp build
, it disappears from index and it does not get included in the build.I have no changes to the default config.