-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
zhaoluming
committed
May 10, 2016
1 parent
27494d0
commit 9cbf986
Showing
1 changed file
with
15 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,27 @@ | ||
# gulp-module-bundler | ||
A gulp plugin for bundle up the html files, css files and javascript file | ||
|
||
一个用来把html、css等文本文件打包放进js文件的gulp插件 | ||
|
||
## Install | ||
npm install --save-dev gulp-module-bundler | ||
|
||
## Usage | ||
## Example | ||
#### gulpfile.js | ||
var bundler = require('gulp-module-bundler'); | ||
gulp.task('module', function() { | ||
return gulp.src('./lib/module.js') | ||
return gulp.src('./module/module.js') | ||
.pipe(bundler()) | ||
.pipe(gulp.dest('./dist/')); | ||
}); | ||
|
||
#### module/module.js | ||
const template = require("./template.ejs") | ||
const style = require("./style.styl") | ||
... | ||
|
||
## Intro | ||
样式和模板文件会以字符串的形式插入到js代码中的对应的位置 | ||
|
||
## Notice | ||
Only support `.html` `ejs` `.styl` files now. |