add replace()
This commit is contained in:
		@@ -21,6 +21,15 @@ export let src = (minimatchPathArrayArg: string[]): Transform => {
 | 
			
		||||
  return gulpStream.stream
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export let dest = () => {
 | 
			
		||||
export let dest = (dirArg: string) => {
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export let replace = () => {
 | 
			
		||||
  return plugins.through2.obj(async (file: Smartfile, enc, cb) => {
 | 
			
		||||
    await file.write()
 | 
			
		||||
    cb(file)
 | 
			
		||||
  }, (cb) => {
 | 
			
		||||
    cb()
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -2,10 +2,12 @@ import * as smartevent from 'smartevent'
 | 
			
		||||
import * as smartfile from 'smartfile'
 | 
			
		||||
import * as smartstream from 'smartstream'
 | 
			
		||||
import * as lodash from 'lodash'
 | 
			
		||||
import * as through2 from 'through2'
 | 
			
		||||
 | 
			
		||||
export {
 | 
			
		||||
  lodash,
 | 
			
		||||
  smartevent,
 | 
			
		||||
  smartfile,
 | 
			
		||||
  smartstream
 | 
			
		||||
  smartstream,
 | 
			
		||||
  through2
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user