I
I
Ilya Belsky2016-03-26 19:43:08
gulp.js
Ilya Belsky, 2016-03-26 19:43:08

How to include libraries from bower_components using gulp?

Good day! Is it possible to automatically include libraries like fontawesome, bootstrap, etc. with gulp? I know that there is, but for some reason I can’t connect exactly the ones listed above using wiredep. What other ways are there to automate this process? The scheme should be like this - I installed some library with the save key through bower, gulp monitors changes in bower.json and loads the paths into the html index file when changes are made.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
HamSter, 2016-03-26
@vik_kodik

Using wiredep , allows you to pull everything installed with bower + gulp-useref in order to pull everything into dist (release).
for example, including styles in index.html in the app source folder, looks like this

<!-- build:css css/vendor.css -->
    <!-- bower:css -->
    <!-- endbower -->
  <!-- endbuild -->

And at the output in index.html in the release folder dist you get the
following Description of the connection in gulpfile.js is, it should not be difficult ...
.pipe(wiredep())
.pipe(useref())

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question