Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jackhutu/pug-inject-webpack-plugin
https://github.com/jackhutu/pug-inject-webpack-plugin
Last synced: about 17 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/jackhutu/pug-inject-webpack-plugin
- Owner: jackhutu
- License: mit
- Created: 2017-02-12T14:31:01.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-03-09T06:03:31.000Z (over 7 years ago)
- Last Synced: 2024-09-19T00:59:02.895Z (6 days ago)
- Language: JavaScript
- Size: 8.79 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## pug-inject-webpack-plugin
pug模板注入依赖插件#### 安装
```
$ npm i --save-dev pug-inject-webpack-plugin
```#### 使用方法
```
new PugInjectPlugin({
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