stc-replace

v1.0.5
Content replace for stc, Support string & regular expression
stc stcjs stc-replace replace

stc-replace

Content replace for stc, Support string & regular expression

Install

npm install stc-replace

How to use

var replace = require('stc-replace');

//string replace
stc.workflow({
  replace: {plugin: replace, include: [/\.(js|css|html)/, {type: 'tpl'}], options: {
    'xxx.com': 'yyy.com'
  }}
})

//regular replace
stc.workflow({
  replace: {plugin: replace, include: [/\.(js|css|html)/, {type: 'tpl'}], options: [
    [/www\.(com|cn)/, 'yyy.com']
  ]}
})
npm i stc-replace

Metadata

  • MIT
  • Whatever
  • lizheming
  • released 8/15/2016

Downloads