Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: create-qiankun #2700

Merged
merged 73 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
025a93b
feat: create-qiankun init
hakushinring Sep 26, 2023
1fc049e
chore: change package name
Sep 26, 2023
b51c831
chore: setup
Sep 26, 2023
b6865e7
chore: init cli template
Sep 27, 2023
5ec6a26
chore: 还原 examples旧模板
Sep 27, 2023
e8523d0
chore: 重新上传模板删除子git信息
Sep 27, 2023
8dc4a56
feat: 开发创建主应用流程
Sep 28, 2023
5e03f8f
feat: create sub app
hakushinring Oct 7, 2023
de68cca
fix: 解决高版本execa打包后报错
Oct 7, 2023
96929f8
chore: resolve conflict
Oct 7, 2023
2e1b8d6
feat: render main application
Oct 9, 2023
e0dfc28
chore: add create Kind
Oct 9, 2023
931f7c3
chore: create sub app
hakushinring Oct 11, 2023
7881a48
chore: 完善子应用创建逻辑,修改若干变量类型
Oct 11, 2023
fab2ae6
feat: 同时创建主子应用,注入子应用信息
Oct 13, 2023
d5b65a8
feat: 完善整体流程
Oct 13, 2023
f090561
chore: 添加注释
Oct 13, 2023
89ff3d2
chore: 增加应用模板
Oct 17, 2023
4696d33
chore: 包管理器类型区分pnpm和pnpm workspace
Oct 17, 2023
ad78d7b
chore: 去除vue项目报错的全屏提示
Oct 17, 2023
f2e7e84
chore: 统一模板启动命令
Oct 17, 2023
9b62bd8
chore: 添加调试 Readme
Oct 17, 2023
e344f84
chore: 修改 sub 变量名
Oct 19, 2023
1700bb7
chore: 添加子模板
Oct 23, 2023
520089c
Merge branch 'feat/create-qiankun' of github.com:hakushinring/qiankun…
Oct 23, 2023
cabf62c
chore: vite-vue rename
Oct 23, 2023
579528b
feat: 增加校验端口钩子
Oct 25, 2023
4c8219b
fix: 解决交互时取消程序依旧执行的问题
Oct 26, 2023
bb8f974
chore: pnpm 添加启动脚本
Oct 26, 2023
44c03c8
fix: 增加项目启动脚本
Oct 26, 2023
48408bf
feat: 增加react18主应用
Oct 27, 2023
772f54b
feat: monorepo add npmrc
Oct 30, 2023
89452c1
chore: subapp webpack config change
hakushinring Oct 31, 2023
89a790e
Merge branch 'feat/create-subapp' into feat/create-qiankun
hakushinring Oct 31, 2023
d4a3d52
feat: template add qiankun dependencies
qiYuei Nov 6, 2023
a8e6683
Merge branch 'feat/create-qiankun' of https://github.com/hakushinring…
qiYuei Nov 6, 2023
cd478fa
fix: 调整模板渲染逻辑
qiYuei Nov 9, 2023
f5dfad7
chore: child app increase scoped
qiYuei Nov 18, 2023
8f6ae30
chore: react18-sub add react router
hakushinring Nov 21, 2023
c56fba1
Merge branch 'feat/create-qiankun' of https://github.com/hakushinring…
qiYuei Dec 7, 2023
9fe295e
feat: main app add check port script
qiYuei Dec 7, 2023
f8cd2fd
fix: main add check port script
qiYuei Dec 7, 2023
e5835e3
chore: 更新模板内容
qiYuei Dec 7, 2023
1e3c79a
fix: react router
hakushinring Dec 9, 2023
87781f9
chore: update ignore for create-qiankun
hakushinring Dec 15, 2023
792a473
Merge branch 'next' into feat/create-qiankun
hakushinring Dec 15, 2023
9681b70
Merge branch 'next' into fix-1209
hakushinring Dec 15, 2023
8ad068c
feat: adjust plugin import and increase render component
qiYuei Dec 15, 2023
a391970
chore: add readme
qiYuei Dec 19, 2023
f856098
chore: increase .npmrc for vue
qiYuei Dec 20, 2023
99cbb82
fix: reat18-sub config
hakushinring Dec 22, 2023
9e8d439
Merge branch 'feat/create-qiankun' of github.com:hakushinring/qiankun…
hakushinring Dec 22, 2023
11f4b15
chore: 删除无用模板
hakushinring Dec 22, 2023
3f12d66
feat: increase umi templates
qiYuei Dec 22, 2023
c7094ca
chore: Merge branch
qiYuei Dec 22, 2023
4bc59a3
chore: 优化vue主应用样式
qiYuei Dec 22, 2023
9ee07e0
Merge remote-tracking branch 'upstream/next' into next
hakushinring Dec 25, 2023
964446a
Merge branch 'next' into feat/create-qiankun
hakushinring Dec 25, 2023
f87cdf7
Create lovely-colts-decide.md
kuitos Dec 25, 2023
c6484d5
Merge remote-tracking branch 'upstream/next' into feat/create-qiankun
hakushinring Dec 25, 2023
c35e950
chore: change package name to create-qiankun
hakushinring Dec 25, 2023
50f247b
chore: change version
hakushinring Dec 25, 2023
ac2e6bd
docs(changeset): feat: introduce qiankun scaffold
hakushinring Dec 25, 2023
280d8d0
Merge branch 'next' of https://github.com/umijs/qiankun into feat/cre…
qiYuei Dec 27, 2023
03b5015
chore: regenerate lock and increase clean script
qiYuei Dec 27, 2023
a2e539b
chore: update the version of qiankun related libraries for templates
qiYuei Dec 27, 2023
30304fc
chore: Merge branch 'next' of into feat/create-qiankun
qiYuei Dec 28, 2023
00a65d2
chore: change react18-main style
hakushinring Dec 29, 2023
fd0d28a
Merge branch 'feat/create-qiankun' of https://github.com/hakushinring…
qiYuei Dec 29, 2023
f146b17
chore: react18-main add router
qiYuei Dec 29, 2023
cf135ea
Update .changeset/empty-jars-vanish.md
kuitos Jan 4, 2024
00f3c48
chore: update the readme recommended node version
qiYuei Jan 4, 2024
1bdeef3
Merge branch 'feat/create-qiankun' of https://github.com/hakushinring…
qiYuei Jan 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/empty-jars-vanish.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'create-qiankun': minor
---

feat: introduce qiankun scaffold
5 changes: 5 additions & 0 deletions .changeset/lovely-colts-decide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@qiankunjs/create-qiankun": patch
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"@qiankunjs/create-qiankun": patch
"create-qiankun": patch

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我重新add一下,版本号是不是应该先改成rc版发个测试

---

feat: introduce qiankun scaffold
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
examples
dist
writable-dom
template

# TODO not linting test files temporary
__tests__/
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ examples
.changeset/*
pnpm-lock.yaml
packages/sandbox/src/core/globals.ts
packages/create-qiankun/template

# changeset 会修改这个文件,导致 prettier:check 失败
packages/**/*/package.json
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"ci": "pnpm run build && pnpm run eslint && pnpm run prettier:check",
"ci:publish": "changeset publish",
"test": "pnpm -r run test",
"prepare": "husky install && dumi setup"
"prepare": "husky install && dumi setup",
"clean": "rimraf node_modules **/*/node_modules"
},
"devDependencies": {
"@changesets/cli": "^2.26.2",
Expand All @@ -39,6 +40,7 @@
"husky": "^8.0.3",
"lint-staged": "^9.5.0",
"prettier": "^3.0.3",
"rimraf": "^3.0.2",
"typescript": "^5.2.2",
"vitest": "^0.34.6"
},
Expand Down
7 changes: 7 additions & 0 deletions packages/create-qiankun/.fatherrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default {
platform: 'node',
cjs: {
input: 'src',
output: 'dist',
},
};
65 changes: 65 additions & 0 deletions packages/create-qiankun/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# @qiankunjs/create-qiankun

`@qiankunjs/create-qiankun` 是一个为 [qiankun](https://github.com/umijs/qiankun) 微前端框架设计的脚手架功能。旨在快速启动示例项目,方便开发者快速上手。

## 功能

- 支持选择一个或多个子应用来创建一个新的项目
- 支持主,子应用路由模式 `(hash, history)` 选择
- 支持一键生成 `npm/yarn/pnpm/pnpm workspace` 工程
- 注入启动应用脚本以及端口冲突检测

## 环境要求

1. 建议使用 Node.js 版本 v18 或更高版本。,推荐使用 [fnm](https://github.com/Schniz/fnm) 管理 node 版本

## 安装

使用 npm:

```bash
npx create-qiankun@latest
```

或使用 yarn:

```bash
yarn create qiankun@latest
```

或使用 pnpm:

```bash
pnpm dlx create-qiankun@latest
```

## 使用

## 模板列表

### 主应用模板

| 模板名称 | |
| --------------- | --- |
| React18+Webpack | |
| Vue3+Webpack | |
| React18+umi | |

### 子应用模板

| 模板名称 | |
| --------------- | --------------------------- |
| React18+Webpack | |
| React16+Webpack | |
| Vue3+Webpack | |
| Vue2+Webpack | ❗ 在 pnpm workspace 有问题 |
| Vite+Vue3 | 🚧 建设中 |
| Vite+React18 | 🚧 建设中 |

## 贡献

欢迎任何形式的贡献!请提交 PR 或开启 issue 讨论。

## 许可证

MIT
33 changes: 33 additions & 0 deletions packages/create-qiankun/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "create-qiankun",
kuitos marked this conversation as resolved.
Show resolved Hide resolved
"version": "0.0.1-rc.1",
"description": "An easy way to start a qiankun project",
"bin": {
"create-qiankun": "./dist/index.js"
},
"main": "./dist/index.js",
"scripts": {
"dev": "father dev",
"build": "father build"
},
"files": [
"dist"
],
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"ejs": "^3.1.9",
"execa": "^5.1.1",
"fs-extra": "^10.1.0",
"kolorist": "^1.8.0",
"minimist": "^1.2.6",
"prompts": "^2.4.2"
},
"devDependencies": {
"@types/ejs": "^3.1.3",
"@types/fs-extra": "^11.0.2",
"@types/minimist": "^1.2.3",
"@types/prompts": "^2.4.4"
}
}
Loading