# @codearts/plugin-packager

> A packager tool for huawei-codearts's plugin.

Latest version **0.0.28** (published 2023-10-30) · SEE LICENSE IN LICENSE license · 0 weekly downloads

## Install

```sh
npm install @codearts/plugin-packager
pnpm add @codearts/plugin-packager
yarn add @codearts/plugin-packager
bun add @codearts/plugin-packager
```

Provides the commands `cap`, `vsix-mi`, `codearts-pack`.

## Health

**Score 35/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.0.28 |
| Published | 2023-10-30 |
| First published | 2022-08-23 |
| Weekly downloads | 0 |
| License | SEE LICENSE IN LICENSE |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 15 |
| Unpacked size | 468.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Maintainers | yeweiasia |
| Keywords | huawei, codearts, plugin, pack |

## Links

- npm: https://www.npmjs.com/package/@codearts/plugin-packager
- Repository: https://github.com/huaweicloud/cloudide-plugin-packager
- Homepage: https://github.com/huaweicloud/cloudide-plugin-packager#readme
- Issues: https://github.com/huaweicloud/cloudide-plugin-packager/issues
- npm.io page: https://npm.io/package/@codearts/plugin-packager

## Dependencies (15)

- [axios](https://npm.io/package/axios.md) ^1.3.3
- [leven](https://npm.io/package/leven.md) ^3.1.0
- [yauzl](https://npm.io/package/yauzl.md) ^2.10.0
- [prompts](https://npm.io/package/prompts.md) ^2.4.2
- [archiver](https://npm.io/package/archiver.md) ^4.0.1
- [fs-extra](https://npm.io/package/fs-extra.md) ^9.0.0
- [inquirer](https://npm.io/package/inquirer.md) ^8.0.0
- [read-pkg](https://npm.io/package/read-pkg.md) ^5.2.0
- [commander](https://npm.io/package/commander.md) ^10.0.0
- [form-data](https://npm.io/package/form-data.md) ^4.0.0
- [micromatch](https://npm.io/package/micromatch.md) ^4.0.2
- [glob-promise](https://npm.io/package/glob-promise.md) ^6.0.2
- [single-line-log](https://npm.io/package/single-line-log.md) ^1.1.2
- [https-proxy-agent](https://npm.io/package/https-proxy-agent.md) ^5.0.1
- [get-proxy-settings](https://npm.io/package/get-proxy-settings.md) ^0.1.13

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 0.0.28 (latest) — 2023-10-30
- 0.0.27 — 2023-06-07
- 0.0.26 — 2023-05-19
- 0.0.25 — 2023-05-15
- 0.0.24 — 2023-04-27
- 0.0.23 — 2023-03-30
- 0.0.22 — 2023-03-29
- 0.0.21 — 2023-03-29
- 0.0.20 — 2023-03-22
- 0.0.19 — 2023-03-21
- 0.0.16 — 2022-08-25
- 0.0.13 — 2022-08-23

## README

# @codearts/plugin-packager

A packager tool for Huawei CodeArts IDE's plugin.

## Usage

install codearts plugin-packager

```bash
npm install @codearts/plugin-packager --save-dev
```

run plugin-packager

```bash
npx cap
```

or you can add `"pack": "cap package -p"` in scripts, then run pack script

```bash
npm run pack
```

## Help

1. `cap -h` show help of tool.
2. `cap package` pack in default mode (development mode), in this mode, all files are packed.
3. `cap package -p` pack in production mode, all unnecessary files are excluded.
4. `cap package -i <files>`, input which file you want to include, or use batch matching with quotation marks.
5. `cap package -e <files>`, input which file you want to exclude, or use batch matching with quotation marks.
6. 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)
7. `cap package -s`, skip npm install before packing.
8. `cap publish`, pack in production mode and publish to [Marketplace](https://marketplace.ide.huaweicloud.com/).
9. `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](https://bbs.huaweicloud.com/blogs/358425).

After the publisher is created, you could create the  corresponding Access Token at [Marketplace](https://marketplace.ide.huaweicloud.com/publisher). Please make sure the publisher in 'package.json' matches the Access Token.

Step 1 - Click Create Token

![](https://bbs-img.huaweicloud.com/blogs/img/20230328/1680008361309607633.png)

Step 2 - Enter the name and expired date and submit

![](https://bbs-img.huaweicloud.com/blogs/img/20230328/1680008369964377160.png)

Step 3 - Copy and save the Access Token

![](https://bbs-img.huaweicloud.com/blogs/img/20230328/1680008374991126275.png)

---
_Source: https://npm.io/package/@codearts/plugin-packager · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
