A Captivate project starting point for 2022
npm install cp-ts-launchpad-v2```
git add .
yarn commit
This will step you through a short CLI which will confirm what kind of changes have been made.
Once you're ready to release to NPM, create a pull request to Main. The CI will first run the Cypress tests to confirm no errors have snuck in. After that, when you accept the pull request, GitHub Actions will automatically change the package.json version number and then push the new build to the npm registry.
You can begin running the localhost test server and the Cypress tests with the following command:
``
yarn test
Within Cypress, the cy.testInCpVersions command has been added to allow you to quickly run tests in different versions of Captivate
` Javascript
it("adds", () => {
cy.testInCpVersions(["BLANK", "CP_0_2019_REGULAR", "CP_0_2019_RESPONSIVE"], () => {
// The following code will be run in the above 3 test fixture environments.
cy.wrap(add(1, 2)).should("eq", 3);
});
});
`
// ADD RELEVANT LINK FOR NEW PROJECT
`$3
By default, the home page for the docs site is the root readme file.$3
TypeDoc is setup, so that any tsdoc comments written in src/*.ts will be added to the documentation site. With the following requirements:
1. Each documented sub-folder to src must have an index.ts which exports the publicized functions.`
export { default as identity } from "./identity";
`2. You must add that documented sub-folder's index.ts file to the typedoc.json in the docs folder.
`
{
"$schema": "https://typedoc.org/schema.json",
"entryPoints": ["../src/core/index.ts", "../src/utils/index.ts"],
"tsconfig": "../tsconfig.json",
"githubPages": true,
"readme": "none"
}
`$3
You can add images to the api with the following markdown:`
!image
`$3
You can add mermaid graphs with the following markdown:
`mermaid
graph LR
Start --> Stop
``