Create a gulp hands

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 Here Insert Picture Descriptionif there are no special requirements, the next step directly default

3. Check whether there is a package.jsonfile

Here Insert Picture Description
4. Create a gulpfile.jstarget 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
Here Insert Picture Description
Here Insert Picture Description
appears the code indicates success.
5.2: In the cmd inside the debug
target folder below the input gulpor gulp -tasks (output when combined task)
Here Insert Picture Description
the emergence of this, on behalf of success. . .

Guess you like

Origin www.cnblogs.com/XSdao/p/11618639.html