The typical developer workflow goes as follow:
Mode | Code analysis | Testing | Building | Publishing |
---|---|---|---|---|
Checking | yarn lint | yarn test or yarn test:cov | yarn build | yarn ready and yarn release:check |
Fixing | yarn lint:fix | yarn test:fix | Fix the code | Update dependencies and yarn doc |
Continuous integration | yarn lint:ci | yarn test:ci | yarn build | bpub |
Run GitHub Actions inside a docker container
Motivation: Test GitHub Actions locally
When to use it: When changing github actions
Run: act
From package: act of brew : Run GitHub Actions locally
Transpile all the typescript source code to javascript
Motivation: ESM library should be written in javascript
When to use it: Before building
Run: yarn build
From package: yarn of npm : Dependency management
Generate the markdown documentation for the typescript project
Motivation: Good documentation is essential for developer experience
When to use it: Before publishing
Run: yarn doc
From package: yarn of npm : Dependency management
Enable useful features for the github project repository
Motivation: Create consistent settings
When to use it: After creating
Run: yarn github
From package: gh of brew : GitHub CLI brings GitHub to your terminal
Find problems in Typescript code
Motivation: Make the code more consistent and avoid bugs
When to use it: When pushing code to github, before testing
Run: yarn lint:ci
From package: baldrick of npm : Zero-config CLI for TypeScript package development
Find problems in Typescript code
Motivation: Make the code more consistent and avoid bugs
When to use it: Before compilation
Run: yarn lint
From package: baldrick of npm : Zero-config CLI for TypeScript package development
Fix problems in Typescript code
Motivation: Facilitate routine maintenance of code
When to use it: Before compilation
Run: yarn lint:fix
From package: baldrick of npm : Zero-config CLI for TypeScript package development
Checks that the markdown documents follows some consistent guidelines
Motivation: Make the markdown documents consistent in style
When to use it: Before publishing
Run: yarn md
From package: yarn of npm : Dependency management
Modify the markdown documents to ensure they follow some consistent guidelines
Motivation: Make the markdown documents consistent in style
When to use it: Before publishing
Run: yarn md:fix
From package: yarn of npm : Dependency management
Delete the dist and report folder
Motivation: Start from a clean slate
When to use it: Before building
Run: yarn prebuild
From package: yarn of npm : Dependency management
Run a sequence of commands to check that the library is ready to be published
Motivation: Detect quality flaws before pushing the code
When to use it: Before pushing a branch
Run: yarn ready
From package: yarn of npm : Dependency management
Delete the dist and report folder
Motivation: Start from a clean slate
When to use it: Before building
Run: yarn reset
From package: yarn of npm : Dependency management
Test and verify the coverage of the code
Motivation: Check that the units of code behave as intended and ensure that every code branch and function is executed
When to use it: When pushing code to github
Run: yarn test:ci
From package: baldrick of npm : Zero-config CLI for TypeScript package development
Run the unit tests
Motivation: Check that the units of code behave as intended
When to use it: After compilation, before build
Run: yarn test
From package: baldrick of npm : Zero-config CLI for TypeScript package development
Verify the extent to which the code has been executed. This does not include any threshold, but it is recommended to maximize the coverage
Motivation: Ensure that every code branch and function is executed
When to use it: After compilation, before build
Run: yarn test:cov
From package: baldrick of npm : Zero-config CLI for TypeScript package development
Run the unit tests and update the snapshots
Motivation: Facilitate routine maintenance of unit test snapshots
When to use it: After compilation, before build
Run: yarn test:fix
From package: baldrick of npm : Zero-config CLI for TypeScript package development
Checks if a release could be created
Motivation: Avoid failing the release
When to use it: After publishing
Run: yarn release:check
From package: baldrick of npm : Zero-config CLI for TypeScript package development
Creates a github release
Motivation: Save releases in github
When to use it: After publishing
Run: bpub
From package: baldrick of npm : Zero-config CLI for TypeScript package development
Summarize all the yarn and shell commands
Motivation: Assist the developer in quickly finding commands
When to use it: Before running a command
Run: yarn h
From package: baldrick of npm : Zero-config CLI for TypeScript package development
Git commit a message that has been saved in the .message file
Motivation: Quicker commit for pre-defined use cases
When to use it: When commit to github
Run: gcf
From package: zsh of brew : Shell designed for interactive use
Install this local project/script globally on the dev machine for development or testing purpose
Motivation: Test global project locally before publishing
When to use it: When testing locally
Run: yig
From package: yarn of npm : Dependency management
Normalize the code structure using baldrick (npx version)
Motivation: Create a consistent developer experience
When to use it: When changing github actions
Run: yarn norm
From package: baldrick-ts of npm : Typescript scaffolding assistant
Normalize the code structure using baldrick (global version)
Motivation: Create a consistent developer experience
When to use it: When changing github actions
Run: yarn norm:g
From package: baldrick-ts of npm : Typescript scaffolding assistant
Run the client with ts-node during development
Motivation: Simulate a CLI app in development without the need to install it globally
When to use it: After compilation
Run: yarn cli
From package: yarn of npm : Dependency management