1.1.1 • Published 5 years ago

gulp-transform-cache v1.1.1

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

gulp-transform-cache

Language Build Status Coveralls npm package npm downloads semantic-release

提供一个自动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[]来标明依赖文件的绝对路径

class Pipe extends Transform {};
const pipe = new Pipe({
  objectMode: true,
  transform: (file: File, enc, callback) => {
    file.depFiles = ['/home/work/xxxxx/xxxx/a.js', '/home/work/xxxxx/xxxx/b.js'];
    callback(null, file);
  }
});

Develop

写入以下内容到配置文件(dev.config.js):

module.exports = {
    packages: [
      // '/Users/xxx/www-wise/amd_modules',
      '/Users/xxx/www-wise/node_modules'
    ]
};

执行 npm run watch:dev 即可进入watch+deploy模式

API

API DOC

1.1.1

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago