- Define your CMS environment in the
.env
file - Develop your features inside the
/src/app/features/
folder, create a new folder for each feature - Tell the application to load any feature
reducers
andsagas
when it starts - Create pages in the
/src/app/pages/
folder to set your page layouts and load your components - Define routes in your application, there are 'Static routes' and 'Content type mappings' which tell the application what pages are to be loaded and when certain routes / content type entries are loaded
- Import components using the import aliases e.g.
~/pages/MyPage
avoid importing components like/src/app/pages/MyPage
or../../../pages/MyPage
npm install
- install dependencies so we can use the applicationnpm start
- start the application in development modenpm run storybook
- start storybook in development modenpm run build
- build the application into production-ready client and server-side bundlesnpm run server
- start the application server same as we would as if it were deployed in productionnpm run build:server
- build the application and start the server-side application from source code (allowing us to connect a debugger and stop on code that is executed server-side)
When you are ready to release your code it is best to change your version number and tag the release with the version number so it is easy to keep track of each release rather than date generated tags. The suggested workflow for releasing is as follows:
- Run
npm version major || minor || patch
see: https://docs.npmjs.com/cli/version - This will generate a new empty commit, push this and wait for the build to pass.
- Once the build has passed in gitlab, run
git tag release-{version-no}
- Then run
git push origin release-{version-no}
CMS | Project | Data | Branch | Version |
---|---|---|---|---|
Production | website | Published | master |
release-* |
CMS | Project | Data | Branch | Version |
---|---|---|---|---|
Production | website | Published | develop |
latest |
CMS | Project | Data | Branch | Version |
---|---|---|---|---|
Production | website | Draft | master |
release-* |
CMS | Project | Data | Branch | Version |
---|---|---|---|---|
Production | website | Draft | develop |
latest |
CMS | Project | Data | Branch | Version |
---|---|---|---|---|
N/A | N/A | N/A | master |
latest |
CMS | Project | Data | Branch | Version |
---|---|---|---|---|
Production | website | Published | master |
release-* |
CMS | Project | Data | Branch | Version |
---|---|---|---|---|
Production | website | Published | develop |
latest |
CMS | Project | Data | Branch | Version |
---|---|---|---|---|
Production | website | Draft | master |
release-* |
CMS | Project | Data | Branch | Version |
---|---|---|---|---|
Production | website | Draft | develop |
latest |