-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: introduce create qiankun cli (#2700)
- Loading branch information
1 parent
56fef69
commit 4c7a773
Showing
216 changed files
with
5,261 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'create-qiankun': minor | ||
--- | ||
|
||
feat: introduce qiankun scaffold |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@qiankunjs/create-qiankun": patch | ||
--- | ||
|
||
feat: introduce qiankun scaffold |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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__/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export default { | ||
platform: 'node', | ||
cjs: { | ||
input: 'src', | ||
output: 'dist', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"name": "create-qiankun", | ||
"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" | ||
} | ||
} |
Oops, something went wrong.