Answer the question
In order to leave comments, you need to log in
Npm, Node, Webpack - how to figure it out for a beginner?
Hello.
There are several projects deployed on my OS X computer in which I work as a HTML layout designer. Many of them used grunt and webpack, node-js, and other fancy stuff.
Right now, I'd like to dive deeper into slim/slim/less/sass and other fancy things that require grunt/webpack, but I can't figure out how best to start these mini-projects.
I have a few questions.
You can link formula with `brew link node`
Warning: node-7.1.0 already installed, it's just not linked
Answer the question
In order to leave comments, you need to log in
1. Strange, I have never seen a node with different versions in different directories before. Let's take a closer look here with screenshots.
2 and 3 - I suggest completely uninstalling node , and then installing NVM for yourself , and when it installs through it, install the latest and other necessary versions of node, if necessary (usually the last one is enough, but for older projects it may be necessary).
4 - just copy the webpack config from the project to the project and cut it. Then, for example, a thought comes to you: so, these five projects had common files such and such, a common folder structure, and such a parameter in the config. How can I generalize this? How can I put it in a separate directory, from which I will then simply copy the finished template? (usually you just need to copy ;) ). When you have a template ready, you will join the world with an exclamation: I have my own boilerplate. Then you can look at others (google webpack boilerplate), but do not immediately take someone else's just like that, but take it apart piece by piece.
ps I have never needed to take "just for layout" webpack. For these purposes, I use gulp + browserify, and when I write in react - webpack.
p.s. what to read? In a nutshell, google for the following: what node.js is, how npm is related to it, what happens when you do npm install, how the scripts section in package.json works.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question