@intent-codes/intent-ruoyi-vue-ts 0.0.1 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,16 +4,17 @@
4
4
  main.ts --type=
5
5
  ```
6
6
 
7
+ ## 发布
7
8
 
8
9
  ```sh
10
+ # 打包
11
+ npm run build
9
12
  # npm 镜像
10
13
  https://registry.npmmirror.com/
11
14
  # npm 官网
12
15
  https://registry.npmjs.com/
13
16
  # 切换
14
17
  npm config set registry=https://registry.npmjs.com/
15
- npm config set //registry.npmjs.org/:_authToken=你的token
16
- npm publish --access public
17
18
 
18
- npm publish --//registry.npmjs.org/:_authToken=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 --access public
19
+ npm publish --access public
19
20
  ```
package/package.json CHANGED
@@ -1,7 +1,11 @@
1
1
  {
2
2
  "name": "@intent-codes/intent-ruoyi-vue-ts",
3
- "version": "0.0.1",
4
- "main": "src/main.ts",
3
+ "version": "0.0.4",
4
+ "main": "dist/index.js",
5
+ "bin": {
6
+ "intent-ruoyi-vue-ts": "dist/index.js"
7
+ },
8
+ "files": ["dist"],
5
9
  "scripts": {
6
10
  "test": "echo \"Error: no test specified\" && exit 1",
7
11
  "build": "tsc"
@@ -19,7 +23,7 @@
19
23
  "oxc-parser": "^0.112.0"
20
24
  },
21
25
  "devDependencies": {
22
- "@types/node": "^25.2.0",
26
+ "@types/node": "^25.2.1",
23
27
  "typescript": "^5.9.3"
24
28
  }
25
29
  }
package/dist/package.json DELETED
@@ -1,25 +0,0 @@
1
- {
2
- "name": "@intent-codes/intent-ruoyi-vue-ts",
3
- "version": "0.0.1",
4
- "main": "src/main.ts",
5
- "scripts": {
6
- "test": "echo \"Error: no test specified\" && exit 1",
7
- "build": "tsc"
8
- },
9
- "type": "module",
10
- "keywords": [],
11
- "author": "",
12
- "license": "ISC",
13
- "description": "",
14
- "dependencies": {
15
- "@oxc-project/types": "^0.112.0",
16
- "@vue/compiler-dom": "^3.5.27",
17
- "@vue/compiler-sfc": "^3.5.27",
18
- "commander": "^14.0.3",
19
- "oxc-parser": "^0.112.0"
20
- },
21
- "devDependencies": {
22
- "@types/node": "^25.2.0",
23
- "typescript": "^5.9.3"
24
- }
25
- }
package/src/main.ts DELETED
@@ -1,44 +0,0 @@
1
- import { parseSync } from "oxc-parser";
2
- import { Command } from 'commander';
3
- const program = new Command();
4
- program.name("ruoyi-vue3-ts").description("若依前端代码生成器").version("0.1.0");
5
-
6
- // ts-api-create
7
- // ts-types-create
8
- // vue-create
9
-
10
- program.command("ts-api-create")
11
- .description("新增 typescript api 代码")
12
- .argument("<path>", "表结构定义文件的路径")
13
- .action((str, option) => {
14
- let code = `import request from "@utils/request";
15
- export async function fetchSth() {
16
- return request.get();
17
- }
18
- `;
19
- console.log(code);
20
- });
21
- program.command("ts-types-create")
22
- .description("新增 typescript interface 代码")
23
- .argument("<path>", "表结构定义文件的路径")
24
- .action((str, option) => {
25
- const code = `declare interface Person{
26
- name: string;
27
- }`;
28
- console.log(code);
29
- });
30
- program.command("vue-create")
31
- .description("新增 vue 代码")
32
- .argument("<path>", "表结构定义文件的路径")
33
- .action((str, option) => {
34
- // TODO: 支持生成多个 vue 文件
35
- const code = `<script lang="ts" setup>
36
-
37
- </script>
38
- <template>
39
- <div>hello world</div>
40
- </template>`;
41
- console.log(code);
42
- });
43
-
44
- program.parse();
package/tsconfig.json DELETED
@@ -1,13 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "noEmit": false,
4
- "target": "esnext",
5
- "module": "nodenext",
6
- "rewriteRelativeImportExtensions": true,
7
- "erasableSyntaxOnly": true,
8
- "verbatimModuleSyntax": true,
9
- "rootDir": "./src",
10
- "outDir": "./dist"
11
- },
12
- "include": ["./src/**/*"]
13
- }
File without changes