This guide are instructions for maintainers. For general installation instructions, read the README file
- Latest LTS version of Node.js (version 22 at the time of writing)
- pnpm package manager (version 10 at the time of writing)
- Clone the repository
- Run
pnpm installfrom the repository root. - Run
pnpm buildfrom the repository root to build all the packages.
You can run optimizely-cms-cli locally (i.e. run from source code) from the sample sites (for example, inside /samples/nextjs-template) by using the command:
pnpm exec optimizely-cms-cli
The CLI provides commands that are organised in topics. You can see them by running either of those commands:
pnpm exec optimizely-cms-cli
pnpm exec optimizely-cms-cli --help
You can also pass the --help flag to any command to see the flags and arguments for each of them
- For
nextjs-template, read the README.md file in that project
-
Create a
release/branch.- If you are releasing one package use the name
release/package-name@x.y.z - If you are releasing multiple packages, choose any other name
- If you are releasing one package use the name
-
For every package that gets released, edit the package.json file with the new pre-release version
- For example
0.1.0-alpha.1
- For example
-
Push the release branch (
git push) -
Go to GitHub and create one Draft release for every released package.
- Tag:
<<package name>>@<<version>>. E.g.@optimizely/cms-cli@0.1.0 - Release name (same as tag)
- Branch: choose the branch you have just created
- Tag:
If the packages are not ready for release, and you need to create one more pre-release version of them:
- Checkout to the
release/branch you created - For every package that gets released, bump the version in package.json and create a new
- Push the branch and the tags
When the packages are ready for release
-
For every package, edit the package.json with the release version.
-
Push the branch to GitHub
-
Go to GitHub and publish the releases
- Add the newly created tags to each of the releases
-
Merge the PR to
mainbranch
This repository is a mono-repo, meaning that multiple packages and artifacts are in the same repository.
.
├── packages/
│ ├── optimizely-cms-cli/
│ └── optimizely-cms-sdk/
├── samples/
│ └── nextjs-template/
├── CONTRIBUTING.md
├── package.json
├── pnpm-lock.yaml
├── pnpm-workspace.yaml
└── README.md
-
The directory
packagesinclude npm packages. These are libraries and tools that users will install from a package registry.- The
optimizely-cms-sdkis the core library. Samples and theoptimizely-cms-clidepend on this. - The
optimizely-cms-cliis a CLI tool for managing the CMS.
- The
-
The directory
samplesinclude are web applications developed to showcase the tools.