- Node v16
# At the root of the repo
npm install
- Make changes to TypeScript files in the
packages/cli
folder. - In repo root, run
npm start
. This will build latest cli and run it inside the sandbox. - To debug with breakpoints
- Use Visual Studio Code to set breakpoints in any TypeScript file within
packages/cli
. - Open debug menu, execute
Debug with sandbox
launch task.
- Use Visual Studio Code to set breakpoints in any TypeScript file within
- Validate build output in
packages/sandbox/public
.
- To test remote caching, enable/update the cache url option inside
packages/sandbox/osmosfeed.yaml
. - To test customization, create an
packages/sandbox/includes
directory and add snippets. - To test static file copying, create a
packages/sandbox/static
directory and add files.
cd
to the root of the repo. Thennpm run test
.- Unit tests are co-located with the source code in
__tests__
folders - E2E tests are located in
packages/test
.- Each test scenario simulates a unique configuration of a repo. Add new new scenarios in
packages/test/scenarios
. - Each spec validates a single behavior under a senario. Add new specs in
packages/test/test.js
.
- Each test scenario simulates a unique configuration of a repo. Add new new scenarios in
- To debug with breakpoints
- Use Visual Studio Code to set breakpoints in either test code in
packages/test
or CLI code inpackages/cli
. - Open debug menu, execute
Debug tests
launch task.
- Use Visual Studio Code to set breakpoints in either test code in
- Build and test are automatically executed for pull requests.
- GitHub acition will run
npm publish
when a git tagv<major>.<minor>.<patch>
is pushed to master branch.
- Make sure
index.hbs
is referencing the latest version of JavaScript and CSS assets.
git checkout <name_of_your_branch>
cd packages/cli
# Choose one of the three
npm version prepatch --preid=beta # starting a new beta (use prepatch|preminor|preemajor as needed)
npm version prerelease # bumping up an existing beta
git add -u # Add updated package.json
git commit -m "message" # Commit updated package.json
git push # Push updated package.json
git tag vX.Y.X # npm might have automatically added a tag. If not, perform the step manually
git push origin vX.Y.X
First, checkout the lastest master branch.
git checkout master
cd packages/cli
npm version patch|minor|major # update official release to new semver
git add -u # Add updated package.json
git commit -m "message" # Commit updated package.json
git push # Push updated package.json
git tag vX.Y.X # npm might have automatically added a tag. If not, perform the step manually
git push origin vX.Y.X
This cause GitHub action to build and publish to npm.
- Update
CHANGELOG.md
to include the latest stable version - Add changelog as release notes in GitHub Releases.
- Make sure all contributors are mentioned in the "thank you" section of the release notes
- Make sure the docs, demo, examples, and templates are up to date.