Introduction:
Let's take a practical example so that it's simple to understand ...
I want to use the Bulma framework in my project, so run the following command:
$ npm install --save-dev bulma
Tchanram! Now I can find both the bulma.css complete file in node_modules\bulma\css\bulma.css
and you can also find the scss files in node_modules\bulma\sass\*
, hence the following questioning
Problem:
If I want to use the complete bulma.css file, should I reference in my html the path to this file there in the node_modules
directory? That is, insert in my <head>
the line: <link rel="stylesheet" href="node_modules\bulma\css\bulma.css">
?
Theoretically it makes sense, after all who clone the project would have to run $npm install
, and then there would be dependence exactly on that path, but what if I want to build this project? Would I have to use a task runner (gulp) to move a copy of this file into my project?
Finally, the most correct way to make use of these dependencies made me a bit confused, considering these needs, what is the best practice to adopt?
P.S.: I already use gulp in the project