Giter VIP home page Giter VIP logo

gulp-seajs-concat's Introduction

gulp-seajs-concat

NPM version Build Status Coverage Status

gulp插件,用于合并编译过的seajs模块

Install

npm install gulp-seajs-concat

Usage:

demo:

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

gulp-seajs-concat's People

Contributors

whxaxes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gulp-seajs-concat's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.