@qlover/create-app 0.1.8 → 0.1.9

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
 
2
2
 
3
+ ## [0.1.9](https://github.com/qlover/fe-base/compare/create-app-v0.1.8...create-app-v0.1.9) (2025-02-20)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * add pnpm install ([#248](https://github.com/qlover/fe-base/issues/248)) ([e1e9f48](https://github.com/qlover/fe-base/commit/e1e9f4841365c51e9b8ea7b01ac6fc70e35eec37))
9
+
3
10
  ## [0.1.8](https://github.com/qlover/fe-base/compare/create-app-v0.1.7...create-app-v0.1.8) (2025-02-19)
4
11
 
5
12
  ## [0.1.7](https://github.com/qlover/fe-base/compare/create-app-v0.1.6...create-app-v0.1.7) (2025-02-19)
@@ -31,6 +31,9 @@ jobs:
31
31
  npm install -g pnpm
32
32
  pnpm -v
33
33
 
34
+ - name: Install dependencies
35
+ run: pnpm install
36
+
34
37
  - name: Pnpm Lint
35
38
  run: pnpm lint
36
39
 
@@ -40,6 +40,9 @@ jobs:
40
40
  npm install -g pnpm
41
41
  pnpm -v
42
42
 
43
+ - name: Install dependencies
44
+ run: pnpm install
45
+
43
46
  - name: Pnpm Lint
44
47
  run: pnpm lint
45
48
 
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env sh
2
+
3
+ npx --no-install commitlint --edit "$1"
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env sh
2
+
3
+ pnpm lint-staged
@@ -0,0 +1,10 @@
1
+ import { FeScriptContext } from '@qlover/scripts-context';
2
+
3
+ const { feConfig } = new FeScriptContext();
4
+
5
+ /**
6
+ * @type {import('@commitlint/types').UserConfig}
7
+ */
8
+ export default {
9
+ ...feConfig.commitlint
10
+ };
@@ -53,7 +53,11 @@
53
53
  "@qlover/env-loader": "latest",
54
54
  "@qlover/fe-standard": "latest",
55
55
  "@qlover/fe-scripts": "latest",
56
- "@qlover/scripts-context": "latest"
56
+ "@qlover/scripts-context": "latest",
57
+ "@commitlint/cli": "^19.7.1",
58
+ "@commitlint/config-conventional": "^19.7.1",
59
+ "husky": "^9.1.7",
60
+ "lint-staged": "^15.0.0",
57
61
  },
58
62
  "dependencies": {
59
63
  "@qlover/fe-utils": "latest"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qlover/create-app",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "main": "./dist/es/index.js",
@@ -1 +1,108 @@
1
- # fe pack-app
1
+ # pack-app
2
+
3
+ A tools....
4
+
5
+ A private monorepo for managing ...
6
+
7
+ ## Directory Structure
8
+
9
+ ```bash
10
+ ├── .github/ # GitHub config files
11
+ │ ├── workflows/ # GitHub Actions workflows
12
+ ├── .vscode/ # VSCode config files
13
+ ├── .husky/ # husky config files
14
+ ├── packages/
15
+ │ ├── node-lib/
16
+ │ ├── node-lib2/
17
+ │ ├── ....
18
+ ├── .gitignore # Git ignore files
19
+ ├── package.json # project config file
20
+ └── README.md # project description
21
+ ```
22
+
23
+ ## Pre-check
24
+
25
+ ### Commit Message Lint
26
+
27
+ Use [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) to standardize commit messages
28
+
29
+ Conventional Commits is a commit message convention, it is recommended to follow a certain format for each Git commit message. The basic format is as follows:
30
+
31
+ Example:
32
+
33
+ ```bash
34
+ <type>(<scope>): <message>
35
+ ```
36
+
37
+ - type: commit type, for example, feat (new feature), fix (bug fix), chore (miscellaneous tasks), etc.
38
+ - scope (optional): the scope of the feature, for example, a module or file.
39
+ - message: a brief description of the purpose of this commit.
40
+
41
+ Common commit types include:
42
+
43
+ - feat: new feature
44
+ - fix: bug fix
45
+ - docs: document modification
46
+ - style: code format related modifications (do not affect code logic)
47
+ - refactor: code refactoring
48
+ - test: add or modify tests
49
+ - chore: other modifications that do not affect the source code (such as dependency updates)
50
+
51
+ fe-release uses release-it, and the current project uses the @release-it/conventional-changelog plugin, so it needs to follow the conventional commits specification
52
+
53
+ When the project is released, it will generate the CHANGELOG.md file according to the commit information of each commit, and generate the release version according to the commit information
54
+
55
+ For example, feat: Add Docs
56
+
57
+ changelog will generate the following similar md:
58
+
59
+ ```md
60
+ ### Features
61
+
62
+ - feat: Add Docs [#5](https://github.com/qlover/brainai-frontend/pull/5) [25dcc5](https://github.com/qlover/brainai-frontend/pull/5/commits/25dcc5d180604f5d46bd3f114cfe0eb01dd13b90)
63
+ ```
64
+
65
+ You can also use commitlint + husky to limit submissions
66
+
67
+ If you are afraid of forgetting, you can directly use the fe-commit command to complete the submission, it is interactive
68
+
69
+ ### Commit Lint
70
+
71
+ When git commit, it will check whether the current submission code meets the eslint + prettier format requirements
72
+
73
+ The current project uses lint-staged to limit the code submitted, only check the code in the staging area
74
+
75
+ **Note:** When submitting too many codes, there will be a slow verification situation, please avoid submitting too many codes at once
76
+
77
+ ## node-lib
78
+
79
+ ```bash
80
+ npx node-lib
81
+ ```
82
+
83
+ ## Release
84
+
85
+ **Note:** When publishing, you need to use npm, not pnpm or yarn, because fe-release internally depends on relesae-it, and release-it only supports npm
86
+
87
+ And you need to provide a higher permission GITHUB_TOKEN, as well as NPM_TOKEN
88
+
89
+ Below is an example of how to publish `node-lib`
90
+
91
+ The current project is hosted on github, so you need to use the github workflow workflow
92
+
93
+ 0. Create a corresponding release.yml file in the .github/workflow directory
94
+
95
+ 1. Submit code and create a Merge PR to the `main` branch
96
+
97
+ If there is a modification to the `packages/node-lib` directory in the current submission, the `workflows/general-check.yml` will give the current PR the `changes:packages/node-lib` label
98
+
99
+ 2. After the current Merge PR is merged into the `main` branch, it will trigger `workflows/release.yml`, the same Merge PR must have `packages/node-lib/**` modifications, otherwise it will not be triggered
100
+
101
+ - When the `release-PR` is triggered, the corresponding `npm run release-pr:node-lib` will be executed, and a Release PR will be created using the bot identity, and the `CI-Release` label will be added, and the commitlint rules will automatically process the `CHANGELOG.md` and `package.json` version number
102
+ - When the Release PR is merged, the corresponding `npm run release:node-lib` will be executed, and the NPM and GitHub release will be published, and a unique tag will be generated
103
+
104
+ Release PR will automatically use the patch version number
105
+
106
+ If the .env(.env.local) setting of FE_RELEASE is false, it will skip the release
107
+
108
+ **Note:** Only when the PR has the `changes:packages/node-lib` and `CI-Release` labels will the release be triggered, of course, you can also directly skip all steps and manually add labels to release, or delete labels to cancel the release
@@ -13,7 +13,7 @@
13
13
  "build": "pnpm -r run build",
14
14
  "prettier": "prettier --ignore-path .prettierignore **/*.{js,ts,json,cjs,mjs} --write",
15
15
  "lint": "eslint . --fix",
16
- "test": "pnpm run test",
16
+ "test": "pnpm -r run test",
17
17
  "clean": "fe-clean",
18
18
  "clean:build": "fe-clean -f packages/*/dist -r",
19
19
  "check-packages": "fe-check-packages",
@@ -33,6 +33,7 @@
33
33
  "@qlover/fe-scripts": "latest",
34
34
  "@qlover/fe-standard": "latest",
35
35
  "@qlover/fe-utils": "latest",
36
+ "@qlover/fe-release": "latest",
36
37
  "@rollup/plugin-commonjs": "^28.0.1",
37
38
  "@rollup/plugin-json": "^6.1.0",
38
39
  "@rollup/plugin-node-resolve": "^15.3.0",