@licq/tpkg

1.0.2 • Public • Published

@licq/tpkg

pack or unpack wechatapp(.wxvpkg) and qqminiapp(.tqapkg) package.

NPM version NPM downloads

Install

npm i --save @licq/tpkg

API

pack

pack dir to pkg

Returns: pathLike
Since: v1.0.0

Param Type Description
sourceDir pathLike [required] The directory to work with
targetPath pathLike [optional] The target path, The default path is the same as the sourceDir.
targetName string [optional] The target filename, The default name is the same as the sourceDir.

Example

const tpkg = require('@licq/tpkg')
const res = tpkg.pack('path/to/dir/');
const res = tpkg.pack('path/to/dir/', 'path/to/dir/demo');
const res = tpkg.pack('path/to/dir/', 'path/to/dir/demo', 'demo.wxvpkg') // or demo.tqapkg
//==> eg: path/to/dir/demo.wxvpkg

unpack

unpack pkg

Returns: pathLike
Since: v1.0.0

Param Type Description
pkgPath pathLike [required] The pkgPath to work with
targetPath pathLike [optional] The target path, The default is the same as the pkgPath.

Example

const tpkg = require('@licq/tpkg')
const res = tpkg.unpack('path/to/dir/demo.wxvpkg', _dirname) // or demo.tqapkg
//==> eg: ${_dirname}/demo/**

CLI

npm i -g @licq/tpkg

# unpack
tpkg path/to/demo.wxvpkg # unpack to path/to/*
tpkg path/to/demo.tqapkg # unpack to path/to/*
tpkg path/to/demo.wxvpkg path/to/target # unpack to path/to/target/*

# pack
tpkg path/to/demo # pack to path/to/demo.wxvpkg
tpkg path/to/demo path/to/target # pack to path/to/target/demo.wxvpkg
tpkg path/to/demo path/to/target demo.tqapkg # pack to path/to/target/demo.tqapkg

Package Sidebar

Install

npm i @licq/tpkg

Weekly Downloads

5

Version

1.0.2

License

MIT

Unpacked Size

9.22 kB

Total Files

5

Last publish

Collaborators

  • uv-w