fis3-hook-annotation
使用注解修改fis文件属性, 精简`fis-conf.js`
Last updated 5 years ago by feix760 .
BSD · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install fis3-hook-annotation 
SYNC missed versions from official npm registry.

fis3-hook-annotation

使用注解修改fis文件属性, 精简fis-conf.js

Demo

/**
 * @moduleId "${subpath}"
 */
module.exports = {
    // ...
};
// fis-conf.js
fis.hook('annotation');

语法

@annotation[:media] [param]..

API

所有文件

@setProperty name value

file[`name`] = `value` // 设置任意属性

@noParser

file.parser = null // 取消scss/es6 babel等parser

@noOptimizer

file.optimizer = null // 取消min压缩

@releaseTo release

file.release = `release`

js文件

@noWrap

file.wrap = false // 将不会被CommonJs使用define包裹

@noMod

file.isMod = false

@moduleId moduleId

file.moduleId = `moduleId`

@es6

file.parser = fis.plugin('babel')  // babel

@uglify

file.optimizer = fis.plugin('uglify-js') // uglify压缩

@useRaw

file.wrap = false;  // 不被define包裹
file.parser = null; // 取消parser
file.optimizer = null; // 取消min压缩

css文件

@useRaw

file.parser = null; // 取消parser
file.optimizer = null; // 取消min压缩

html文件

Note

  • 注解需放在文件第一个块注释中

Current Tags

  • 0.0.8                                ...           latest (5 years ago)

8 Versions

  • 0.0.8                                ...           5 years ago
  • 0.0.7                                ...           5 years ago
  • 0.0.6                                ...           5 years ago
  • 0.0.5                                ...           5 years ago
  • 0.0.4                                ...           5 years ago
  • 0.0.3                                ...           5 years ago
  • 0.0.2                                ...           5 years ago
  • 0.0.1                                ...           5 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (1)

Copyright 2014 - 2016 © taobao.org |