These days a lot of installation gulp stepped pit, now explain an entry-case analysis:
== First we need to ensure that node, npm, npx, gulp installation was successful ==
These installations are fools installation, you can find the appropriate teaching material.
Create your own folder, by cmd command or manually create all ok here is to explain the global installed after mpn
1.cd into the destination folder
cd cd E:\code\js\gulp02
2. Initialize
npm init
Staff if there are no special requirements, the next step directly default
3. Check whether there is a package.json
file
4. Create a gulpfile.js
target file below.
== This file will be stored to the main code ==
Next, we write a little test code in this file below
function defaultTask(cb) {
// place code for your default task here
cb();
}
exports.default = defaultTask
5. Debugging
5.1: In vscode inside the debugger
first install Gulp Tasks This plug-in
appears the code indicates success.
5.2: In the cmd inside the debug
target folder below the input gulp
or gulp -tasks (output when combined task)
the emergence of this, on behalf of success. . .