Skip to content

Latest commit

 

History

History
136 lines (90 loc) · 7.77 KB

README.md

File metadata and controls

136 lines (90 loc) · 7.77 KB

BEG Monorepo

License: MIT Code Style PRs Welcome Node Gitter Average time to resolve an issue Percentage of issues still open Donate Twitter

All services for Blog Environment Group. The monorepo system is powered by rushjs.

Ecosystem

Project Version Build Status Description
blog-cms blog-cms-version blog-cms-build-status The CMS for Yancey blog with React, Apollo Client, Material-UI and GraphQL.
blog-web blog-web-version blog-web-build-status The website app for Yancey blog with React, Next.js, styled-components, Apollo Client and GraphQL.
blog-service blog-service-version blog-service-build-status The backend platform for Yancey Official Blog with Node.js, NestJS, MongoDB, GraphQL, JWT and more.
uploader-service uploader-service-version uploader-service-build-status The Uploader service powered by Azure Blob.
@shared/components @shared/components-version @shared/components-build-status Common components library.
@shared/utils @shared/utils-version @shared/utils-build-status Common utils library.

Prerequisite

Installing Node.js and PNPM

We recommend the basic environment is Node.js 14 LTS and PNPM. A better way to manage versions of Node.js is using nvm. And PNPM is a fast, disk space efficient package manager, rushjs default uses PNPM to manage dependencies.

# Installing NVM
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash

# Installing pnpm
npm install -g pnpm

Installing rushjs

BEG Monorepo uses rushjs to manage monorepo. Please install it globally.

pnpm install -g @microsoft/rush

Installing commitizen

BEG Monorepo follows the Angular Team's Commit Message Guidelines, your git commit will be checked by commitlint, please use git cz instead of git commit. For this reason, please install commitizen globally.

Available Scripts

In the project directory, you can run:

rush add -p YOUR_DEPENDENCY

To install dependencies for sub projects, enters the sub project directory and execute the command. If install devDependencies, add --dev at the end.

rush update

Executing this command after registering a new sub project or modifying rush.json. If throw ERROR Broken lockfile: no entry for '...' in pnpm-lock.yaml, please try rush update --full.

# Force all projects to be rebuilt:
rush rebuild

# Incremental build:
rush build

If you want to build specified project, use rush build -o YOUR_SUB_PROJECT.

rushx YOUR_SCRIPT

If you want to execute script of package.json in one project, you can use the rushx command. You run it under the project folder that you want to operate on. The rushx command is analogous to pnpm run, but with slightly less typing, slightly better error reporting, and command-line help.

rush change

Note your changes will eventually be published in a changelog.md file in each package. The publish or version command will consume these files and perform the proper version bumps.

rush version --bump

Uses this command to bump the version of the package and generate a changelog. Please execute this command after you have made changes to the package and executed rush change.

Recipes

GitHub Actions workflows template

To generate or update GitHub Actions CI/CD config file easily, you can execute sh bin/workflows.sh under the project root folder.

Bumping versions

You must execute rush change and rush version --bump before merge reuqest.

Contributing

The main purpose of this repository is to continue to evolve BEG (Blog Environment Group), making it faster and easier to use. Development of BEG happens in the open on GitHub, and we are grateful to the community for contributing bugfixes and improvements. Read below to learn how you can take part in improving BEG.

BEG has adopted a Code of Conduct that we expect project participants to adhere to. Please read the full text so that you can understand what actions will and will not be tolerated.

Read our contributing guide to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes to BEG.

Good Issues

Please make sure to read the Issue Reporting Checklist before opening an issue. Issues not conforming to the guidelines may be closed immediately.

License

BEG Monorepo is licensed under the terms of the MIT licensed.