# vue-code-generator-plugin-test

> iss-library-web-designer Code Generate Solution - Vue

Latest version **0.0.3** (published 2023-08-23) · ISC license · 0 weekly downloads

## Install

```sh
npm install vue-code-generator-plugin-test
pnpm add vue-code-generator-plugin-test
yarn add vue-code-generator-plugin-test
bun add vue-code-generator-plugin-test
```

## Health

**Score 30/100 (F)** — status: abandoned.

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

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2023-08-23 |
| First published | 2023-08-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 13 |
| Unpacked size | 8.5 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | shellcoochi |

## Links

- npm: https://www.npmjs.com/package/vue-code-generator-plugin-test
- npm.io page: https://npm.io/package/vue-code-generator-plugin-test

## Dependencies (13)

- [jszip](https://npm.io/package/jszip.md) ^3.7.1
- [tslib](https://npm.io/package/tslib.md) ^2.3.0
- [semver](https://npm.io/package/semver.md) ^7.3.5
- [js-base64](https://npm.io/package/js-base64.md) ^3.6.1
- [file-saver](https://npm.io/package/file-saver.md) ^2.0.5
- [codesandbox](https://npm.io/package/codesandbox.md) ^2.2.3
- [@types/js-base64](https://npm.io/package/@types/js-base64.md) ^3.3.1
- [@types/file-saver](https://npm.io/package/@types/file-saver.md) ^2.0.4
- [@alilc/lowcode-types](https://npm.io/package/@alilc/lowcode-types.md) ^1.0.0
- [string-natural-compare](https://npm.io/package/string-natural-compare.md) ^3.0.1
- [@alilc/lowcode-code-generator](https://npm.io/package/@alilc/lowcode-code-generator.md) ^1.0.4
- [@types/string-natural-compare](https://npm.io/package/@types/string-natural-compare.md) ^3.0.2
- [@alilc/lowcode-plugin-base-monaco-editor](https://npm.io/package/@alilc/lowcode-plugin-base-monaco-editor.md) ^1.0.0

## Recent versions

- 0.0.3 (latest) — 2023-08-23
- 0.0.2 — 2023-08-21
- 0.0.1 — 2023-08-21

## README

# ISS WEB-DESIGNER CODE-GENERATOR
# 浪潮软件股份有限公司
# 天工开务 网页设计器 出码插件
## 出码
所谓出码，即将低代码编排出的 schema 进行解析并转换成最终可执行的代码的过程。
## 项目说明
```sh
本项目为浪潮软件股份有限公司，天工开务-网页设计器的出码插件，本插件提供vue3的出码方案，同时具备网页端出码和服务端出码的能力。
```
## 使用方法

### 1) 网页出码，通过注册到[网页设计器](http://git.inspur.com/iss-lcdp-web/web/web-designer-demo)中体验

1. 安装依赖：`npm install --save @iss-library-web-designer-plugins/code-generator`
2. 注册插件:

```ts
import { plugins } from '@alilc/lowcode-engine';
import CodeGenPlugin from '@iss-library-web-designer-plugins/code-generator';

// 在你的初始化函数中：
await plugins.register(CodeGenPlugin);

// 如果您不希望自动加上出码按钮，则可以这样注册
await plugins.register(CodeGenPlugin, { disableCodeGenActionBtn: true });
```
### 2) 服务端出码，直接使用提供的出码 API 体验
1. 安装依赖: `npm install --save @iss-library-web-designer-plugins/code-generator`
2. 引入代码生成器:

```js
import CodeGenerator,{ publishers } from '@iss-library-web-designer-plugins/code-generator/generator';
```
3. 创建项目构建器:

```js
const projectBuilder = CodeGenerator();
```
4. 生成代码

```js
const project = await projectBuilder.generateProject(
  schema, // 编排搭建出来的 schema
);
```
5. 将生成的代码写入到磁盘中(也可以生成一个 zip 包)

```js
// 写入磁盘
await publishers.disk().publish({
  project, // 上一步生成的 project
  outputPath: '/path/to/your/output/dir', // 输出目录
  projectSlug: 'your-project-slug', // 项目标识
});

// 写入到 zip 包
await publishers.zip().publish({
  project, // 上一步生成的 project
  outputPath: '/path/to/your/output/dir', // 输出目录
  projectSlug: 'your-project-slug', // 项目标识 -- 对应生成 your-project-slug.zip 文件
});
```
## 快速开发

### 1) 启动项目
```bash
$ git clone http://git.inspur.com/iss-lcdp-web/web/iss-library-web-designer-plugins/code-generator.git
$ cd code-generator
$ npm install
$ npm start
```
## 本地调试运行 Demo

```sh
> npm run generator
```

---
_Source: https://npm.io/package/vue-code-generator-plugin-test · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
