Skip to content

Commit

Permalink
refactor: ♻️ 重构整体架构,优化项目文件生成逻辑 (#210)
Browse files Browse the repository at this point in the history
* ci : 添加tsc检查--添加build命令 (#89)

* ci: add a new workflow

* ci: 添加tsc检查--添加build命令

---------

Co-authored-by: CP <p.chen@synovate.tech>

* ci: 从 commitlint.config.js 读取规则 (#99)

* ci: 🎡 the pre commit hook monitors readme document changes and updates the core package document (#113)

* feat: add jsdoc of utils (#114)

* feat: add jsdoc of utils

* feat: add jsdoc of utils

* ci: commit信息校验兼容revert (#116)

Co-authored-by: 田丰 <2038998136@qq.com>

* feat: 新增对行末换行符、git大小写敏感配置的检查

* docs: 使用 vitePress 搭建文档 (#124)

* docs: 使用 vitePress 搭建文档

* style(docs): config.mjs 代码风格格式化

* docs: 📚 版本号更新

* ci: 🎡 修改提交规范,允许提交 feat(xxx) 等带括号的描述 (#125)

* ci: 🎡 修改提交规范,允许提交 feat(xxx) 等带括号的描述

* feat: 🚀 为 docs 添加工作区,解决 docs 不能安装依赖包的问题

* ci: 🎡 添加 vitepress 自动部署 (#135)

* docs: 添加贡献者名单 (#136)

* ci: 🎡 修复ci的报错问题 (#137)

* chore: 🔨 remove unused files to clean up the project (#139)

* docs: 📚 修改 vitepress 首页文档 (#141)

* refactor: 重构整体架构,优化项目文件生成逻辑 (#206)

* ci: 🎡 add a new workflow (#25)

* ci: 🎡 add a new workflow

* ci: 🎡 add a new workflow

* ci: 🎡 add a new workflow

* ci: 🎡 add a new workflow

* feat: 完成重构升级函数的架构: (#24)

* refactor: 完成创建package.json,同时处理了一些其他小改动: (#28)

* refactor: 优化 git init 的判断逻辑: (#29) (#42)

* fix: 🧩 修复创建项目时重名文件删除失败的错误 (#46)

* feat: add devDependencies install: (#40) (#49)

* feat: add devDependencies install: (#40)

---------

Co-authored-by: “邓浩” <“1051766345@qq.com”>

* feat: 基于 preset 生成中英文的 readme 文档: (#43)
---------

Co-authored-by: uaenaTzx <3131496501@qq.com>
Co-authored-by: liujunqi <liujunqi@vandream.com>

* feat: 完成重构升级函数的架构: (#24)

* refactor: 完成创建package.json,同时处理了一些其他小改动: (#28)

* refactor: 新增 Generator 相关操作,实现插件调用: (#44)

* refactor: 初步完善 babel 插件的 generator 实现,实现 generate 插件调用逻辑: (#44)

* feat: relize_generatorApi_method (#80)

* refactor: 修改插件路径,发包测试 (#90)

* refactor: merge生产环境与开发环境的plugin模块引入 (#97)

* fix: 修复 generate 运行时 loadModule 的加载问题 (#101)

* feat: file tree 构建方法实现 (#108)

* fix: 测试环境loadmodule全路径适配 (#110)

* fix: 测试环境loadmodule全路径适配

- 使用__dirname代替process.cwd()
- loadmodule函数中通过相对路径定位到plugin

* fix: 线上环境loadmodule全路径适配

- 将loadmodule内的路径操作移动至loadmodule外

* fix: 消除硬编码问题

* fix: 解决硬编码问题

- 将 createNeatRootPath 转移至 utils/constants文件中,全局提供create-neat项目根目录

* fix: 规范constants文件内容

* Feature/readme&preset#43 (#50)

* feat: 完成重构升级函数的架构: (#24)

* feat: auto create readme recording preset: (#43)

---------

Co-authored-by: uaenaTzx <3131496501@qq.com>
Co-authored-by: liujunqi <liujunqi@vandream.com>

* fix:修复spawn中不支持win32平台的bug(#57) (#63)

Co-authored-by: “邓浩” <“1051766345@qq.com”>

* feat: 添加npm源的选择 (#52) (#70)

* ci: commit message不符合规范时抛出错误(#69) (#73)

Co-authored-by: liujunqi <liujunqi@vandream.com>

* feat: 添加 VSCode Debug 配置文件 (#83)

* feat: 🚀 增加dependencies的安装方式

* feat: TemplateAPI初步实现 (#126)

* feat: prettier-plugin的实现 (#129)

* feat: plugin-typescript的初步实现 (#130)

* feat: ✨ merge build tool config by ast (#94)

* feat: ✨ merge build tool config by ast

* feat: ✨ update code according cr

* feat: ✨ abstract ast method

* feat: ✨ add jsdoc

* feat: 🚀 preminliary implementation of plugin-eslint & remove redundant code. (#138)

* 删除重构后无用的文件,修改部分文件注释,删除无用代码 (#142)

* feat: 删除大部分重构后不需要的文件

* feat: 删除部分无用函数、注释

* refactor: 整理 core 中部分逻辑,优化项目结构 (#143)

* feat: 调整 template 结构,给插件提供 ejs 渲染能力,修复部分细节问题 (#145)

* fix: 🧩 修复了文件创建过程中存在的一些错误 (#146)

* refactor: ♻️ refactor: 在packages下的core和utils增加了jsDoc (#147)

* fix: 🧩 路径修改以及终端输出样式修改 (#154)

* fix: 🧩 路径修改以及终端输出样式修改

* fix: 🧩 format cjs

* fix: 🧩 format mjs&json

* feat: 🚀 add file tree (#159)

* feat: 🚀 add file tree

* feat: 🚀 add file tree

* feat: 🚀 optimize renderTemplates

* feat: 🚀 jsdoc优化,加入兜底操作

* feat: 🚀 optimize jsdoc

* feat: 🚀 ast合并vite配置功能 (#161)

* feat: 🚀 ast合并vite配置功能

* refactor: ♻️ 优化插件配置写入构建工具配置流程

* refactor: 修改生成插件配置文件方法 (#162)

* feat: 🚀  TemplateAPI 和 GeneratorAPI 整合,抽象为一个父类,并新增 Template 生成逻辑 (#170)

* fix: 🧩 修改 webpack 配置中模块引入类型错误以及为 package.json 添加相关的 dependent (#177)

* fix: 🧩 修复构建工具缺少相关 dependentcies 依赖的问题 (#178)

* feat: 增加默认预设选项 (#171)

* feat: 新增 vue 模版 (#179)

* feat: 新增 vue 模版

* feat: 添加 vue 依赖

* feat: 🚀 增加 prettier 插件入口 cjs文件 (#176)

* feat: 🚀增加 prettier 插件入口 cjs文件

* fix: 🧩 修改 prettier 配置内容并加入 scripts 脚本

* fix: 🧩 抽离单独 prettier 必要依赖等

* feat: 新增 react 模板 (#175)

* feat: 新增 react 模板

* feat: 添加 React 依赖项

* feat: 🚀 新增 swc 插件 (#168)

* feat: 增加记录用户自定义预设功能 (#184)

* fix: 🧩 修复 eslint 的依赖错误 (#185)

* feat: 🚀 feat: 增加 prettier 插件入口 cjs文件

* fix: 🧩 fix: 修改 prettier 配置内容并加入 scripts 脚本

* fix: 🧩 fix: 抽离单独 prettier 必要依赖等

* fix: 🧩 修复 eslint 的依赖错误

* style: 🎨 修改插件的包名 (#183)

Co-authored-by: xun082 <2042204285@qq.com@qq.com>

* feat: 🚀 新增.gitignore文件,计算下载包时间 (#191)

* feat: 🚀 新增.gitignore文件,计算下载包时间

* feat: 🚀 新增.gitignore文件,计算下载包时间

* fix: 修复 mac 无法删除目录问题 (#190)

* feat: 🚀 文件树设计文件后缀修改的内容抽离为中间件处理 (#186)

* style: 🎨 修改脚手架命令行列表 (#182)

* feat: 增加swc插件出口文件 (#198)

* feat: 🚀 添加 webpack 完整配置,并添加 scripts 脚本用于启动 webpack 编译 (#201)

* feat: 优化插件配置注入框架变量 (#202)

* fix: 🧩 修复 webpack 配置错误,以及require.resolve引起的一些模块加载错误 (#203)

* fix: 🧩 修复 webpack 配置错误,以及require.resolve引起的一些模块加载错误

* fix: 🧩 修复 webpack 配置错误,以及require.resolve引起的一些模块加载错误

* fix: 🧩 修复 webpack 配置错误,以及require.resolve引起的一些模块加载错误

---------

Co-authored-by: Moment <73689580+xun082@users.noreply.github.com>
Co-authored-by: uaenaTzx <3131496501@qq.com>
Co-authored-by: uaenaTzx <104181441+uaenaTzx@users.noreply.github.com>
Co-authored-by: hao deng <38180313+qq1051766345@users.noreply.github.com>
Co-authored-by: “邓浩” <“1051766345@qq.com”>
Co-authored-by: Sphinx-l <87009423+Sphinx-l@users.noreply.github.com>
Co-authored-by: liujunqi <liujunqi@vandream.com>
Co-authored-by: yueyun <3514392356@qq.com>
Co-authored-by: Jin Yiming <2022742378@qq.com>
Co-authored-by: 小朱 <103256281+Sunrisies@users.noreply.github.com>
Co-authored-by: Joker Won <35907198+jokerwon@users.noreply.github.com>
Co-authored-by: non_hana <105428118+nonhana@users.noreply.github.com>
Co-authored-by: blackworld <44086696+sincerely1@users.noreply.github.com>
Co-authored-by: Gtbz <44564817+haoyanwang@users.noreply.github.com>
Co-authored-by: Lemonadeccc <82374719+Lemonadeccc@users.noreply.github.com>
Co-authored-by: cai-cai-hu <166509524+cai-cai-hu@users.noreply.github.com>
Co-authored-by: Tao Lin <122189177+taolin011@users.noreply.github.com>
Co-authored-by: yyx <76930408+yangdaxian-is-cool@users.noreply.github.com>
Co-authored-by: yhstsy <90331250+yhstsy@users.noreply.github.com>
Co-authored-by: yuhao <76569582+yuhao423@users.noreply.github.com>
Co-authored-by: Leo <64624463+wuwenbang@users.noreply.github.com>
Co-authored-by: xun082 <2042204285@qq.com@qq.com>
Co-authored-by: 小熊今晚不熬夜 <99244399+Xiong-YH@users.noreply.github.com>
Co-authored-by: cmtlyt <95839504+cmtlyt@users.noreply.github.com>

* refactor: ♻️ 删除没有使用到的项目文件 (#207)

* refactor: ♻️ 删除没有使用到的项目文件

* feat: 🚀 为 eslint 警告添加 prettier 自动修复功能 (#208)

* fix: 🧩 升级husky版本,避免代码提交时错误引起文件误删的问题 (#209)

---------

Co-authored-by: Cpeng888 <134287700+Cpeng888@users.noreply.github.com>
Co-authored-by: CP <p.chen@synovate.tech>
Co-authored-by: qoioiw <143949926+qoioiw@users.noreply.github.com>
Co-authored-by: xiaoFeng5210 <38905126+xiaoFeng5210@users.noreply.github.com>
Co-authored-by: KongAKun <143328179+KongAKun@users.noreply.github.com>
Co-authored-by: 田丰 <104338839+anjiazhuyouxing@users.noreply.github.com>
Co-authored-by: 田丰 <2038998136@qq.com>
Co-authored-by: non_hana <1209220829@qq.com>
Co-authored-by: non_hana <105428118+nonhana@users.noreply.github.com>
Co-authored-by: ve <52314078+vaebe@users.noreply.github.com>
Co-authored-by: doki- <95574719+IsDyh01@users.noreply.github.com>
Co-authored-by: uaenaTzx <3131496501@qq.com>
Co-authored-by: uaenaTzx <104181441+uaenaTzx@users.noreply.github.com>
Co-authored-by: hao deng <38180313+qq1051766345@users.noreply.github.com>
Co-authored-by: “邓浩” <“1051766345@qq.com”>
Co-authored-by: Sphinx-l <87009423+Sphinx-l@users.noreply.github.com>
Co-authored-by: liujunqi <liujunqi@vandream.com>
Co-authored-by: yueyun <3514392356@qq.com>
Co-authored-by: Jin Yiming <2022742378@qq.com>
Co-authored-by: 小朱 <103256281+Sunrisies@users.noreply.github.com>
Co-authored-by: Joker Won <35907198+jokerwon@users.noreply.github.com>
Co-authored-by: blackworld <44086696+sincerely1@users.noreply.github.com>
Co-authored-by: Gtbz <44564817+haoyanwang@users.noreply.github.com>
Co-authored-by: Lemonadeccc <82374719+Lemonadeccc@users.noreply.github.com>
Co-authored-by: cai-cai-hu <166509524+cai-cai-hu@users.noreply.github.com>
Co-authored-by: Tao Lin <122189177+taolin011@users.noreply.github.com>
Co-authored-by: yyx <76930408+yangdaxian-is-cool@users.noreply.github.com>
Co-authored-by: yhstsy <90331250+yhstsy@users.noreply.github.com>
Co-authored-by: yuhao <76569582+yuhao423@users.noreply.github.com>
Co-authored-by: Leo <64624463+wuwenbang@users.noreply.github.com>
Co-authored-by: xun082 <2042204285@qq.com@qq.com>
Co-authored-by: 小熊今晚不熬夜 <99244399+Xiong-YH@users.noreply.github.com>
Co-authored-by: cmtlyt <95839504+cmtlyt@users.noreply.github.com>
  • Loading branch information
1 parent 17c0c76 commit 4bdb462
Show file tree
Hide file tree
Showing 252 changed files with 7,728 additions and 15,020 deletions.
6 changes: 5 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ module.exports = {
node: true,
jest: true,
},
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
],
overrides: [
{
env: {
Expand Down
28 changes: 15 additions & 13 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,19 @@ What kind of change does this PR introduce?

<!-- Please check the one that applies to this PR using "x". -->

```
[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Other... Please describe:
```
- [ ] Bugfix
- [ ] Feature
- [ ] Code style update (formatting, local variables)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] CI related changes
- [ ] Documentation update
- [ ] Performance improvement
- [ ] Test related changes
- [ ] Security fix
- [ ] Dependency update
- [ ] Revert changes
- [ ] Other... Please describe:

## What is the current behavior?

Expand All @@ -33,10 +37,8 @@ What kind of change does this PR introduce?

## Does this PR introduce a breaking change?

```
[ ] Yes
[ ] No
```
- [ ] Yes
- [ ] No

<!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. -->

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/code-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ jobs:
required: false
description: 'System message to be sent to OpenAI'
default: |
You are `@lineDown` (aka `lineDown[bot]`), a language model
trained by Moment. You are a talented little girl, proficient in programming work,
You are `@lineDown` (aka `lineDown[bot]`), a language model
trained by Moment. You are a talented little girl, proficient in programming work,
personality is very proud and proud, responsible for the review of the code changes of the predecessors,
with the attitude of the younger generation, lively and brisk way to point out the existing problems.
Use the markdown format. emoji can be included. Such as:
Expand All @@ -52,8 +52,8 @@ jobs:
- Optimization
- Best practices: DRY, SOLID, KISS
Do not comment on minor code style issues, missing
comments/documentation. Identify and resolve significant
concerns to improve overall code quality while deliberately
Do not comment on minor code style issues, missing
comments/documentation. Identify and resolve significant
concerns to improve overall code quality while deliberately
disregarding minor issues.
Please response in Chinese
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,6 @@ yarn-error.log*

# Webstorm
.idea/

# vitepress
docs/.vitepress/cache
3 changes: 0 additions & 3 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

echo 'running commit-msg checks ...'

./scripts/check_commit_msg.sh "$1"
22 changes: 19 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
sh scripts/check-git-config.sh

echo 'running pre-commit checks ...'

# 运行 lint-staged
npx lint-staged -q

echo -e 'pre-commit success!\n'
# 检查 lint-staged 的退出状态
if [ $? -ne 0 ]; then
echo 'lint-staged failed'
exit 1
fi

echo 'running pre-commit workflow ...'

# 运行 preCommitExec 脚本
node ./scripts/preCommitExec.mjs

# 检查 preCommitExec 脚本的退出状态
if [ $? -ne 0 ]; then
echo 'pre-commit workflow failed'
exit 1
fi

echo 'pre-commit success!'
28 changes: 28 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
// 使用 IntelliSense 了解相关属性。
// 悬停以查看现有属性的描述。
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
// => `create-neat myapp`
{
"name": "create project",
"request": "launch",
"runtimeExecutable": "create-neat",
"runtimeArgs": ["myapp", "--dev"], // 命令行参数
"skipFiles": ["<node_internals>/**"],
"console": "integratedTerminal", // 使用集成终端
"type": "node"
},
// => `create-neat add eslint`
{
"name": "add a plugin",
"request": "launch",
"runtimeArgs": ["add", "eslint"],
"runtimeExecutable": "create-neat",
"skipFiles": ["<node_internals>/**"],
"console": "integratedTerminal",
"type": "node"
}
]
}
9 changes: 1 addition & 8 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"typescript.tsdk": "node_modules/typescript/lib",
"cSpell.words": ["interaciton"]
}
{}
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## Create-Neat

### README.md
- zh_CN [简体中文](README.md)
- en [English](readme/README-EN.md)


### 一、背景 📖

在刚开始学习 `React` 的时候,使用的脚手架就是 `create-react-app`,虽然这个脚手架提供的零配置、开箱即用很适合新手,但是要想对其进行扩展就非常麻烦。要想对其进行扩展你必须 `eject` 或者 使用 `carco` 进行配置。
Expand Down
1 change: 0 additions & 1 deletion apps/template-common-lib/README.md

This file was deleted.

28 changes: 0 additions & 28 deletions apps/template-common-lib/package.json

This file was deleted.

4 changes: 0 additions & 4 deletions apps/template-common-lib/template/.gitignore

This file was deleted.

3 changes: 0 additions & 3 deletions apps/template-common-lib/template/.prettierignore

This file was deleted.

12 changes: 0 additions & 12 deletions apps/template-common-lib/template/.prettierrc.json

This file was deleted.

13 changes: 0 additions & 13 deletions apps/template-common-lib/template/.vscode/settings.json

This file was deleted.

3 changes: 0 additions & 3 deletions apps/template-common-lib/template/src/index.ts

This file was deleted.

29 changes: 0 additions & 29 deletions apps/template-common-lib/template/tsconfig.json

This file was deleted.

7 changes: 0 additions & 7 deletions apps/template-husky/README.md

This file was deleted.

28 changes: 0 additions & 28 deletions apps/template-husky/package.json

This file was deleted.

4 changes: 0 additions & 4 deletions apps/template-husky/template/.gitignore

This file was deleted.

4 changes: 0 additions & 4 deletions apps/template-husky/template/.husky/commit-msg

This file was deleted.

5 changes: 0 additions & 5 deletions apps/template-husky/template/.husky/pre-commit

This file was deleted.

Loading

0 comments on commit 4bdb462

Please sign in to comment.