0.0.8 • Published 8 years ago

fis3-hook-annotation v0.0.8

Weekly downloads
2
License
BSD
Repository
github
Last release
8 years ago

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

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

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago