If the default settings are enough to work, you need to add an additional option at the end:
The created file will contain information about the current project (project name, description, author, list of dependencies, etc.).
The author is asked to enter all this data. After each entry, the Enter key is pressed. portugal rcs data In most cases, it is enough to specify the title, description, and author's name, and leave the rest of the parameters by default. After answering all the questions, the package.json file should appear in the folder.
Next, we proceed to installing Gulp directly into the myproject project directory.
npm and gulp --save-dev
It can have an abbreviated form:
npm i gulp -D
The main difference from the global installation is the absence of the -g flag. And then the program is installed locally in the place from which the command line was opened. At the same time, the -D option (or --save-dev) appeared, meaning that the package and its version are guaranteed to be added to the package.json file. This useful function will allow you to quickly install packages from other projects in the future by simply copying this file.
So, the program is installed in our myproject folder. Inside, a subdirectory named node_modules was created, containing Gulp itself along with all dependencies.
The command is executed:
-
- Posts: 61
- Joined: Sun Dec 22, 2024 4:07 am