gulp-transform-cache
提供一个自动cache的transform,其API同readable-stream
How to use
1、编写的Gulp插件管道继承本包export的transform即可
2、生产环境中设置process.env.build_cache = "open"
打开cache
3、插件需要使用callback来返回流,否则该插件不生效cache
4、如果该流返回的文件有其他依赖,请在返回的file文件上附带depFiles: string[]来标明依赖文件的绝对路径
{};const pipe = objectMode: true { filedepFiles = '/home/work/xxxxx/xxxx/a.js' '/home/work/xxxxx/xxxx/b.js'; ; };
Develop
写入以下内容到配置文件(dev.config.js):
moduleexports = packages: // '/Users/xxx/www-wise/amd_modules', '/Users/xxx/www-wise/node_modules' ;
执行 npm run watch:dev
即可进入watch+deploy模式