1.0.1 • Published 8 years ago

fis3-postpackager-html-replace v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

fis-postpackager-html-replace

用于替换html内元素

功能

  • 自动将页面中声明的区域进行替换

用法

$ npm install -g fis3-postpackager-html-replace
$ vi path/project/fis-conf.js # 编辑项目配置文件
//file : path/project/fis-conf.js
fis.match('::package', {postpackager: fis.plugin('html-replace', {
  replace: true // 默认false, true 替换为替换内容, false 替换为原始内容
}, 'append')})
<body>
  <!-- @replace -->
    原始内容
  <!-- @replace.to -->
    替换内容
  <!-- @replace.end -->
</body>
  • true
<body>
    替换内容
</body>
  • false
<body>
    原始内容
</body>
1.0.1

8 years ago

1.0.0

8 years ago