fis-prepackager-replacer

1.0.1 • Public • Published

fis-prepackager-replacer


介绍

根据配置文件 替换资源中的模板字符串

使用

修改fis-conf.js,添加

fis.config.set('modules.prepackager', 'replacer');
fis.config.set('settings.prepackager.replacer', {
    config: pathConfig
});

pathConfig

module.exports = {
    hw: 'hello world'
}

js 或 html文件

// html
<div>{#hw#}</div>

// js

var obj = {
  text: "{#hw#}"
}

// 替换后

// html
<div>hello world</div>

// js

var obj = {
  text: "hello world"
}

Package Sidebar

Install

npm i fis-prepackager-replacer

Weekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

1.64 kB

Total Files

3

Last publish

Collaborators

  • ziloliang