Skip to content

bcguan2008/gulp-negpack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gulp-negpacker

gulp-negpacker 是NEG的工程化工具,负责打包压缩NEG代码模块。

How?

类似Webpacker 于RequireJs,gulp-negpacker是NEG.JS的打包工具(基于gulp)

  1. NEG是通过require('moduleName')来调用模块,所以整个打包工具建立在require的使用上
  2. 设计一个深度的概念,来解决嵌套引用问题,并且可以按照深度来排序,保证JS的加载顺序

Installation:

npm install gulp-negpacker --save-dev

NEG lib:https://github.com/bcguan2008/NEG.git

Sample:

var gulp = require('gulp');
var negpack = require('gulp-negpacker');

gulp.task("pack",function(){

	gulp.src("HomePage.js")
		.pipe(negpack({
			root:"../Lib/NEG/"
		}))
		.pipe(rename(function(path){
			path.extname= '.min.js';
		}))
		.pipe(gulp.dest('/build/'));

});

About

gulp-negpack

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published