Skip to content

Latest commit

 

History

History
65 lines (45 loc) · 1.51 KB

README.md

File metadata and controls

65 lines (45 loc) · 1.51 KB

gulp-kissy-transport Build Status

提取kissy深层依赖

适用于kissy1.2+以上版本,不适合kissy5.0+

提取前

app/index.js

KISSY.add('app/index',function(S,Node,Feature){
  //...
},{
  requires:['node','components/feature/']
})

components/feature/index.js

KISSY.add('components/feature/',function(S,io){
  //...
},{
  requires:['io']
})

配置gulp

var extracter = require('gulp-kissy-transport')
extracter.config('packages', [{
    name: 'app',
    path: './test/app'
}, {
    name: 'components',
    path: './test/components'
}, {
    name: 'common',
    path: './test/app'
}])
gulp.src(['./test/**/*.js','!./test/build/**/*.js'])
    .pipe(extracter.deepenDeps())
    .pipe(gulp.dest('./test/build'))

首先配置kissy的包,参考对比kissy包配置详情

提取后

app/index.js

KISSY.add('app/index',function(S,Node,Feature){
  //...
},{
  requires:['node','components/feature/','io']
})

查看演示demo

mat服务可以支持combo请求

npm install mat -g mat

http://127.0.0.1:8989/examples/test.html?debug

http://127.0.0.1:8989/examples/test.html