Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/whxaxes/gulp-seajs-concat
seajs gulp plugin
https://github.com/whxaxes/gulp-seajs-concat
Last synced: 28 days ago
JSON representation
seajs gulp plugin
- Host: GitHub
- URL: https://github.com/whxaxes/gulp-seajs-concat
- Owner: whxaxes
- License: mit
- Created: 2015-03-16T10:08:28.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-04-17T16:21:03.000Z (over 8 years ago)
- Last Synced: 2024-10-05T02:08:07.696Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 69.3 KB
- Stars: 5
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gulp-seajs-concat
[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coverage Status][coveralls-image]][coveralls-url]
gulp插件,用于合并编译过的seajs模块
## Install
```
npm install gulp-seajs-concat
```## Usage:
demo:
```javascript
var gulp = require("gulp");
var transport = require("gulp-seajs-transport");
var uglify = require("gulp-uglify");
var concat = require("gulp-seajs-concat");
gulp.task('default' , function(){
return gulp.src('javascripts/**/*')
.pipe(transport())
.pipe(concat({
alias: {
'common': './public/javascript/cmdmodule/base/common',
'http': './public/javascript/cmdmodule/base/http'
},
base: "./pubic/javascript/",
filter: /\/app\//g
}))
.pipe(uglify())
.pipe(gulp.dest("./dist"));
})
```## API
### alias
别名,对应seajs.config的alias,如果在seajs的config里加了alias,最好在concat也配置上该alias,concat才能找到响应文件### base
基础目录,对应seajs.config的base,js文件里require的路径第一个字符不是.的路径将在前面加上base目录。### filter
过滤正则,过滤输出文件/目录## Running Test
```
make test
```## License
MIT[npm-url]: https://npmjs.org/package/gulp-seajs-concat
[npm-image]: http://img.shields.io/npm/v/gulp-seajs-concat.svg
[travis-url]: https://travis-ci.org/whxaxes/gulp-seajs-concat
[travis-image]: http://img.shields.io/travis/whxaxes/gulp-seajs-concat.svg
[coveralls-url]: https://coveralls.io/r/whxaxes/gulp-seajs-concat
[coveralls-image]: https://coveralls.io/repos/github/whxaxes/gulp-seajs-concat/badge.svg