https://github.com/jackhutu/jade-inject-webpack-plugin
https://github.com/jackhutu/jade-inject-webpack-plugin
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/jackhutu/jade-inject-webpack-plugin
- Owner: jackhutu
- License: mit
- Created: 2016-07-31T08:17:42.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2017-02-11T13:54:29.000Z (over 9 years ago)
- Last Synced: 2025-03-09T23:34:35.830Z (over 1 year ago)
- Language: JavaScript
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## jade-inject-webpack-plugin
jade模板注入依赖插件
#### 安装
```
$ npm i --save-dev jade-inject-webpack-plugin
```
#### 使用方法
```
new JadeInjectPlugin({
indent:['spaces',2], //默认空格2, 其它选项: ['tab',1]
filePath: name, //模板文件路径
output: name, //输出目录
inject: false, //是否注入, 否则只是复制
injectJs: ['commons',filename], //注入的JS文件列表,可以不带扩展名, 数组格式
injectCss: [filename] //注入的CSS文件列表,,可以不带扩展名, 数组格式
})
```
- indent 模板缩进的种类和数量,可选, 默认空格2 : ['spaces', 2]
- filePath 必选
- output 必选
#### 详见Demo
[https://github.com/jackhutu/koa2-webpack-startkit](https://github.com/jackhutu/koa2-webpack-startkit)
### License
MIT