Skip to content

Latest commit

 

History

History
76 lines (52 loc) · 1.66 KB

README_MAINTAIN.md

File metadata and controls

76 lines (52 loc) · 1.66 KB

How to maintain this repo

please use npm v7.x or newer version, because we need the npm's workspaces feature.

# setup the dev environment
npm i

# build all packages
npm run build

unit test

Every time you fix a bug or introduce a new feature to @cocos/ccbuild, please remember considering to add your unit test into test folder.

# run test
npm test

# update the snapshot
npm test -- -u

changelog generation

We use changesets to manage all the changelog. Every time you make a change in the repo, please generate a changeset in the folder .changeset, this file should be also commit to the repo.

# generate changelog
npm run change

API generation

Remember to update the public API every time you change the interface.

# generate API report in '.api' directory
npm run api

You can generate API document in this way:

# use typedoc to generate API document
npm run doc

version the package

Please version the package before you publish.

# this command would consume all the changesets in `.changeset` folder.  
npm run version

# this command won't consume any of the changesets.
npm run version-alpha

publish

We used monorepo but only @cocos/ccbuild is public project, every time we need to publish, we need to deploy the project first. Please remember to version your package before you deploy and publish it.

# this would collect all private project together, and generate one project in 'deploy' folder
npm run deploy

# if you got a publish authorization, then you could publish the package in 'deploy' folder
cd ./deploy/
npm publish