@codearts/plugin-packager
v0.0.28
Published
A packager tool for huawei-codearts's plugin.
Downloads
9
Readme
@codearts/plugin-packager
A packager tool for Huawei CodeArts IDE's plugin.
Usage
install codearts plugin-packager
npm install @codearts/plugin-packager --save-dev
run plugin-packager
npx cap
or you can add "pack": "cap package -p"
in scripts, then run pack script
npm run pack
Help
cap -h
show help of tool.cap package
pack in default mode (development mode), in this mode, all files are packed.cap package -p
pack in production mode, all unnecessary files are excluded.cap package -i <files>
, input which file you want to include, or use batch matching with quotation marks.cap package -e <files>
, input which file you want to exclude, or use batch matching with quotation marks.- You can also create a 'pack-config.json' file in workspace, directly to set files you want to include or exclude like: { "exclude": [], "include": [] }. (See Batch matching rule)
cap package -s
, skip npm install before packing.cap publish
, pack in production mode and publish to Marketplace.cap publish -t 1
, Set the release type. "0" indicates the grayscale release, "1" indicates the official release, and the default is grayscale release.
Batch matching rule
- *.js only match js files in current dir.
- **/*.js match all js files.
- path/*.js match js files in path.
- .{jpg,png,gif} means jpg, png or gif.
- src/** match all files in src.
How to get the Access Token
When you run cap publish
, an Access Token is necessary. If you don't have a publisher, please refer to the Help Document.
After the publisher is created, you could create the corresponding Access Token at Marketplace. Please make sure the publisher in 'package.json' matches the Access Token.
Step 1 - Click Create Token
Step 2 - Enter the name and expired date and submit
Step 3 - Copy and save the Access Token