fis3-hook-annotation

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

Showing:

Popularity

Downloads/wk

1

GitHub Stars

2

Maintenance

Last Commit

5yrs ago

Contributors

0

Package

Dependencies

0

Size (min+gzip)

0.9KB

License

BSD-2-Clause

Type Definitions

Tree-Shakeable

No?

Categories

Readme

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

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

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial