Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

gulp-qap

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-qap

[qap](http://open.taobao.com/docs/doc.htm?treeId=260&articleId=105545&docType=1)项目的gulp插件,替换[qap-cli](https://www.npmjs.com/package/qap-cli)。

latest
npmnpm
Version
0.0.3
Version published
Maintainers
1
Created
Source

qap项目的gulp插件,替换qap-cli

特性

  • 自动升级
  • 检测jssdk
  • 调试
  • 打包

打包

gulp.task('package', function(cb){
    var zip = require('gulp-rax-qap').package({
        qapJson:'./qap.json',//必须
        // update:true,
        // jssdk:{
        //     version:'stable',//defaul beta|stable
        //     update:true}//是否每次debug/package都检测sdk升级
        }).zip;
    gulp.src('build/**/*.js')
        .pipe(zip('package.zip'))
        .pipe(gulp.dest('_output'));
});

调试

用法

gulp.task('debug', function(cb) {
    var debugServer = require('gulp-rax-qap').devtool;
    debugServer({
        webpack: require('webpack.config.js') //必须字段
    }, cb);
});

详细参数

{
    ip: '30.*', //调试所用的IP,支持正则表达式,默认使用检测到的第一个ip
    port: 8088, //调试端口,default 8088
    fileServerPort: 8080,//文件映射端口,方便客户端获取qap.json
    verbose: true, //是否输出普通日志,default false
    webpack: require('webpack.config.js'), //必须字段,
    jssdk: {
        version: 'stable', //defaul beta|stable
        update: true //是否每次debug/package都检测sdk升级,否则只会每天数次运行检测更新
    },
    webpackDevServerConfig: {//webpack启动参数,参考:https://webpack.github.io/docs/webpack-dev-server.html
        hot: false,//default false
        inline: true,//default true
        quiet: true,//default quiet
        publicPath: webpack.output.publicPath,
        headers: { 'Access-Control-Allow-Origin': '*' },
        contentBase: path.resolve(process.cwd(), './')
    }, //overwrite defualt
    openUrl: ['h5', 'debug', 'page'] //打开的页面,h5(h5版本) | debug(调试页面) | page(单个js页面),默认打开三个
}

打包

to be continued...

FAQs

Package last updated on 26 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts