xapt

Create, validate & convert xFace application package

npm install xapt
15 downloads in the last week
60 downloads in the last month

xapt

==========

Create, validate & convert xFace application package

Usage

  • Install it with npm

    npm install xapt -g

  • To create an app package

    xapt-create path/to/app app.xpa

    Options:
        ``-c, --config  create app.xml``
        ``-a, --autoconfig  Create a default app.xml automatically``
    
  • To validate an app package

    xapt-check test.zip

    or

    xapt-check path/to/app

    Options:

    ``-m, --minify  use uglify.js to minify *.js``
    ``-t, --target  target filename``
    

API

creator

var creator=require('xapt').creator;

var package = {
    source:'path/to/app'
    target:'test.xpa'
};

creator(package.source, package.target, function(err){
       if(err){
           console.log(err);
       }
    });

validator


var validator=require('xapt').validator;

var package = {
    source:'test.zip',  //required
    target:'test.xpa',  //optional
    minify:true   //optional
};

validator(package, function(err){
       if(err){
           console.log(err);
       }
    });

package = {
    source:'path/to/app',  //required
    target:'target',  //optional
    minify:true   //optional
};

validator(package, function(err){
       if(err){
           console.log(err);
       }
    });

xapt

==========

xface应用创建、验证和转化的打包工具

用法

  • 使用 npm 安装

    npm install xapt -g

  • 创建一个应用包

    xapt-create path/to/app app

    Options:
        ``-c, --config  以交互方式创建app.xml。注:app.xml不存在才会创建app.xml``
        ``-a, --autoconfig  自动创建默认的app.xml``
    
  • 验证应用包的合法性 xapt-check path/to/test.xpa

    或者

    xapt-check path/to/app

    Options:

    ``-m, --minify  混淆js文件``
    ``-t, --target  目标文件路径``
    

API接口

creator

var creator=require('xapt').creator;

var package = {
    source:'path/to/app'
    target:'test.xpa'
};

creator(package.source, package.target, function(err){
       if(err){
           console.log(err);
       }
    });

validator


var validator=require('xapt').validator;

var package = {
    source:'test.zip',  //required
    target:'test.xpa',  //optional
    minify:true   //optional
};

validator(package, function(err){
       if(err){
           console.log(err);
       }
    });

package = {
    source:'path/to/app',  //required
    target:'target',  //optional
    minify:true   //optional
};

validator(package, function(err){
       if(err){
           console.log(err);
       }
    });
npm loves you