Answer the question
In order to leave comments, you need to log in
How to reuse gulpfile.js?
Good day to all! Not so long ago I started using Gulp, and I ran into this problem: I don’t understand how to reuse package.json, this is how it is described in one of the guides:
The package.json file is the manifest file of our project, which describes, in addition to the information that we entered in the terminal, also information about the packages used in our project.
For example, if we install Gulp into the project with the --save-dev key, then the package and version used will automatically be added to our package.json. This accounting will allow you to quickly deploy a new project using the existing package.json and install the necessary modules with dependencies that are specified in package.json in new projects.
Answer the question
In order to leave comments, you need to log in
dependencies / plugins must be specified in package.json
the keys dependencies
or devDependencies
, if they are not there, then the dependencies / plugins must be installed as indicated in the manual with the flags --save --save-dev
or --save --save-exact
, and then just copy gulpfile.js and package.json to a new project and execute the command in it npm install
(as said in the answer above)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question