Skip to content

Commit

Permalink
初步完成 vue-ts 模板
Browse files Browse the repository at this point in the history
  • Loading branch information
dogodo-cc committed Sep 13, 2024
1 parent 36b8beb commit a354549
Show file tree
Hide file tree
Showing 127 changed files with 8,589 additions and 2,465 deletions.
4 changes: 2 additions & 2 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
registry=https://registry.npmmirror.com
#registry=https://registry.npmjs.org
#registry=https://registry.npmmirror.com
registry=https://registry.npmjs.org
@cocos-fe:registry=https://registry.npmjs.org
@editor:registry=http://creator-npm.cocos.org:7001/

Expand Down
25 changes: 0 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,31 +28,6 @@ cocos creator FE team [官网](https://cocos-creator.github.io/fe-team/)

此时执行 `npm install` 会在 `node_modules` 里生成命中的包的软连接。

比如 packages/\* 的文件夹结构如下:

```sh
- packages
-- eslint-config
-- hell-build
-- utils
```

且它们的 package.json 的名称符合格式: `@cocos-fe/xxx`,那么 node_modules 中将生成如下的结构:

![workspaces](./assets/workspaces-1.png)

所以推荐需要对外发布的统一以 `@cocos-fe/xxx` 的格式命名。

这样在当前项目范围内,就可以直接

```js
import xxx from '@cocos-fe/xxx';
```

如果不按照格式命名,辨识度会降低很多:

![workspaces](./assets/workspaces-2.png)

## 发包线上

```bash
Expand Down
Binary file removed assets/workspaces-1.png
Binary file not shown.
Binary file removed assets/workspaces-2.png
Binary file not shown.
5,658 changes: 4,241 additions & 1,417 deletions package-lock.json

Large diffs are not rendered by default.

7 changes: 1 addition & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
{
"name": "cocos-fe",
"version": "1.0.0",
"description": "cocos fe team",
"private": false,
"workspaces": [
"packages/*",
"projects/*",
"packages-demos/*"
"projects/*"
],
"scripts": {
"preinstall": "node ./scripts/preinstall-check-node.js",
Expand Down Expand Up @@ -48,8 +46,5 @@
"*.{vue,js,ts}": [
"npm run lint:js"
]
},
"volta": {
"node": "20.12.0"
}
}
13 changes: 0 additions & 13 deletions packages-demos/cocos-plugin-vue2/hello.build.config.mjs

This file was deleted.

14 changes: 0 additions & 14 deletions packages-demos/cocos-plugin-vue3/hello.build.config.mjs

This file was deleted.

35 changes: 0 additions & 35 deletions packages-demos/cocos-plugin-vue3/source/App.vue

This file was deleted.

42 changes: 0 additions & 42 deletions packages-demos/cocos-plugin-vue3/source/components/HelloWorld.vue

This file was deleted.

10 changes: 0 additions & 10 deletions packages-demos/cocos-plugin-vue3/tsconfig.node.json

This file was deleted.

48 changes: 0 additions & 48 deletions packages-demos/jscodeshift/.vscode/launch.json

This file was deleted.

15 changes: 0 additions & 15 deletions packages-demos/jscodeshift/index.js

This file was deleted.

15 changes: 0 additions & 15 deletions packages-demos/jscodeshift/package.json

This file was deleted.

37 changes: 0 additions & 37 deletions packages-demos/jscodeshift/source.js

This file was deleted.

57 changes: 0 additions & 57 deletions packages-demos/jscodeshift/transform.js

This file was deleted.

Loading

0 comments on commit a354549

Please sign in to comment.