Custom template for CDK development with TypeScript.
The cdk.json file tells the CDK Toolkit how to execute your app.
-
Follow this guide: Creating a new repository
-
On the second step select our template:
cdk-template-typescript
Update package.json file with the new repository name, description and add
yourself as new contributor.
{
"name": "[repository-name]",
"description": "[repository-description]",
"repository": "ddias-dev/[repository-name]",
"contributors": [
{
"name": "Diego Dias",
"email": "ddias.dev@gmail.com"
},
{
"name": "[developer-name]",
"email": "[developer-email]"
}
],
"bugs": "https://github.com/ddias-dev/[repository-name]/issues",
"homepage": "https://github.com/ddias-dev/[repository-name]#readme"
}- Package management with Yarn 2
- Automated version management with Semantic Release
- Code format with Prettier
- Git hooks with Husky
- Lint code with ESLint
- Lint commit messages with commitlint
- Lint staged files with lint-staged
yarn installinstall packagesyarn upgrade-interactiveeasy way to update outdated packagesyarn formatformats all files supported by Prettier in the current directory and its subdirectoriesyarn buildcompile typescript to jsyarn watchwatch for changes and compileyarn testperform the jest unit testsyarn cleanclean up yarn caches, remove node_modules and yarn.lock
cdk deploydeploy this stack to your default AWS account/regioncdk diffcompare deployed stack with current statecdk synthemits the synthesized CloudFormation template
See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope> is the Jira issue identifier
feat(PLAT-1): Add hat wobble
^--^ ^----^ ^------------^
| | |
| | +---> Summary in present tense and must be sentence-case.
| |
| +-----------> Jira issue identifier.
|
+----------------> Type: chore, docs, feat, fix, refactor, style, or test.
More Examples:
feat: (new feature for the user, not a new feature for build script)fix: (bug fix for the user, not a fix to a build script)docs: (changes to the documentation)style: (formatting, missing semi colons, etc; no production code change)refactor: (refactoring production code, eg. renaming a variable)test: (adding missing tests, refactoring tests; no production code change)chore: (updating grunt tasks etc; no production code change)
References:
- https://www.conventionalcommits.org/
- https://seesparkbox.com/foundry/semantic_commit_messages
- http://karma-runner.github.io/1.0/dev/git-commit-msg.html
Using GitHub Actions that is a continuous integration and continuous delivery (CI/CD) platform that allows you to automate your build, test, and deployment pipeline. You can create workflows that build and test every pull request to your repository, or deploy merged pull requests to production.
The workflows are divide by:
-
deploy-[env]: deploy the infrastructure to a specific environment. -
release: is a semantic release that analyzer commits and might generate a release notes and new version based on semantics commits. -
test: is triggered by pull requests, to run the testing before merge to main.
To enhance the development experience is recommend install those vs-code extensions:
- Code Spell Checker - Spelling checker for source code
- Commit Message Editor - Edit commit messages in a convenient way.
- ESLint - Integrates ESLint JavaScript into VS Code.
- GitLens — Git supercharged - Supercharge Git within VS Code.
- markdownlint - Markdown linting and style checking for Visual Studio Code.
- Prettier - Code formatter - Code formatter using prettier.