1.0.7 • Published 7 years ago

gulp-jsc v1.0.7

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

gulp-jsc

实现了什么功能?(What we can do?)

  1. 按目录合并seajs模块,相对路径,一次合并到处运行,支持seajs 1.0|1.1|1.2|1.3|1.3+
  2. 预编译html模板为./tmpl.js模块
  3. 文件改变自动编译

给个栗子 Sample gulpfile.js

var gulp = require('gulp');
var fs = require('fs');
var path = require('path');
var gutil = require('gulp-util');
var jsc = require('gulp-jsc');


gulp.task('default', function () {
	//默认运行listen和all俩个任务
    gulp.run(['listen','all']);
    gutil.log('begin watch ..');
});

gulp.task('all', function () {

    // 文件合并,这里表示把js/module里面全部可以合并的seajs模块合并
    gulp.src('../res/js/module/**').pipe(jsc());
});

gulp.task('listen', function () {

    // 监听文件合并,当src里某个文件改变的时候,合并其所在目录
    gulp.watch("../res/js/**/src/**", function (event) {
        gulp.src(event.path).pipe(jsc());
    });
});

License

gulp-jsc is available under the terms of the MIT License.

##The end.

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago