How can I efficiently incorporate CSS and JS files from an NPM package, installed via gulp, into my index.html file?
I have used NPM to install the Materialize CSS framework by running:
npm install --save-dev materialize-css
Now, I need to include the CSS and JS files from this framework in my index.html
. These files are located at
node_modules/materialize-css/dist/css/materialize.min.css
and node_modules/materialize-css/dist/js/materialize.min.js
.
What is the best approach for achieving this task, considering that I am using gulp
?
Should I reference the full path to the files in node_modules
directly from index.html
?
Or should I copy them to ./dist
using a gulp
task with absolute paths specified in
gulpfile.js</code, and then link them in <code>index.html
as ./dist/materialize.min.css
and ./dist/materialize.min.js
?
I would greatly appreciate any guidance on this matter. Apologies if this question seems basic, as it's difficult to determine the most effective solution.