Skip to content

Commit

Permalink
add usage
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoluming committed May 10, 2016
1 parent 27494d0 commit 9cbf986
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions README.md
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.

0 comments on commit 9cbf986

Please sign in to comment.