Feat: project engineering transformation, using pnpm unified management module, adding some scripts. #840
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The client and server are placed in the root directory in the warehouse, so it is necessary to switch to the corresponding directory when developing. Personally, it is not very optimized, so the project has been reformed based on pnpm package management:
-treat the whole chat2DB as a project, the front end depends on the root directory management, package.json is promoted to the root directory, and the scripts inside are consistent with those of the client.
-Rename the script directory, add ci and lint scripts, and support the locking of dependent versions, while locking the versions of node and pnpm.
-eslint, prettier and other code formatting rules refer to the root directory, which can provide constraints for the subsequent entire repo code style.
The transformation of this PR is mainly an engineering change of the project, which does not involve business, nor does it move the scripts, commands, configurations, etc. of the original client. It is an early demo.
You can pull down the branch and execute the command at the root directory to confirm whether this transformation is feasible.
When the front end needs to be developed:
If the script permission does not support it, you can execute:
chmod +x ./scripts/*
You can try to execute the command that needs to be executed in the client at the root directory to confirm whether the build and package are available normally.
If the transformation of this PR can enable the daily iterative development of Chat2DB project, the follow-up can be considered to expand on this basis:
-Delete the dependency configuration, verification configuration, etc. in the client directory and adopt the root directory uniformly.
-use npm command for tag iteration, including version iteration, for example, npm version path.
-A new script is added to support automatic filling, tag and push of CHANGELOG based on Git records.
-After the engineering-level scripts are perfected, some CI and CD configurations are accessed by using github's actions, and some efforts are made for continuous integration and continuous delivery.
The project is very good and has perfect functions, but it still needs to be engineered in iterative development. Code Review, code verification, document verification, automatic deployment, release publishing and packaging pipeline, etc. can all be considered and tried with only one purpose: