1.0.1 • Published 6 years ago

fis-prepackager-replacer v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

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"
}
1.0.1

6 years ago

1.0.0

6 years ago