I am not a web developer, and though I believe this question must have a simple answer, I couldn't find it in the documentation, nor online.
I'll use html5 boilerplate to create a very simple app.
I would like to run
npm install an-arbitrary-js-library --save
gulp build
and be able to
import a_random_function from 'an-arbitrary-js-library'
in my js/main.js file.
How can I adapt my HTML5 Boilerplate to add third-party JS libraries to my project automatically?
Just put a script tag with the source referring to your library in the index.html file. I don't know how you orginzed the project but you can copy the file of your third library from node_module to the project
js/vendoror any other folders using gulp see from line 69 --> 95 here, this is the way they set jQuery in the project.