@flexbase/template-typescript-package v0.0.2
template-typescript-package
golden path for writing and publishing packages at Flexbase.
Design
The template repo has the following setup, feel free to add additional capabilities:
- tsconfigs for typescript
- jest testing setup
- linting precommit hooks
- vscode helpers to watch and debug tests
- cicd shared workflows for both beta and production build/deploys
- sonarcloud properties file
The goal to this approach: provide golden paths that are fully supported by Flexbase, and bring focus to the business logic, while removing manual setup and deployments.
Build & Deployment
Deployments of the package are outlined in the .github/workflows
. Deployments occur for the following events:
Event | Deploy Type | Naming Convention |
---|---|---|
pull request | beta | <package.json.version>-beta.<github-run-number> |
merge to main | production | <package.json.version> |
Betas allow you and other consumers to test out new releases before merging to main. When merging to main, be sure to bump the package.json version for your change; otherwise npmjs
will reject the deployment since it prevents users from mistakenly overriding existing releases.
Testing
npm t
is the main command to run tests via command line - there are also a number of .vscode
launch configs that exist to support jest watch commands. The Run and Debug button on the left hand side (Activity bar) is where you can access these.
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago