zoukankan      html  css  js  c++  java
  • Gulp 相关

    获取执行在文件列表:

    http://www.thinksaas.cn/ask/question/21950/

    through2这个插件。

    var through = require('through2');
    
    gulp.task('xx',function(){
     return gulp.src('src/js/*.js')
    .pipe(through.obj(function(file,enc,cb){
    console.log(file.relative);
    console.log(file.path);
    this.push(file);
    cb();
    }))
    }).on('task_stop', () => {});
    npm install gulp-print
    npm install gulp-filenames
    npm install gulp-filelog
    npm install gulp-debug
     

    VS Code 调试 gulp 任务

    {
    // Use IntelliSense to learn about possible Node.js debug attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
    {
    "type": "node",
    "request": "launch",
    "name": "启动程序",
    "program": "${workspaceRoot}\node_modules\gulp\bin\gulp.js",
    "args": [
    "demo"
    ],
    "cwd": "${workspaceRoot}"
    },
    {
    "type": "node",
    "request": "attach",
    "name": "附加到进程",
    "port": 5858
    }
    ]
    }

    gulp.watch 监控文件增加

    gulp.watch('**/*.html', {cwd: './'}, ['html']),
  • 相关阅读:
    traceroute原理
    IP转发和子网路由
    Dijkstra算法
    String源码学习
    多线程的参数传递
    hbase参数配置优化
    hadoop 点点滴滴(一)
    Win8安装教程!笔记本用U盘安装Win8只需三步
    CentOS 6.4下编译安装MySQL 5.6.14
    Nginx配置文件说明
  • 原文地址:https://www.cnblogs.com/linr/p/5458368.html
Copyright © 2011-2022 走看看