@brisberg/typescript-pkg
v2.0.3
Published
<Description of TypeScript package>
Downloads
1
Readme
<package-name>
Describe this package. Delete the TypeScript Pkg README below.
Actions
yarn build
- Builds the package, emitting .js and .d.ts filesyarn lint
- Runs lint over the project sourceyarn test
- Runs all tests under the src/ directoryyarn publish
- Bumps package version and publishes the package to Github Packages
Toolchain
Uses @brisberg/typescript-pkg as a template for Toolchain configuration.
See that repo for a list of tools, documentation, and upgrade steps.
TypeScript Pkg (Template)
Standard project configuration template for @brisberg TypeScript packages.
This is an opinionated toolchain configuration for TypeScript packages published to Github Packages.
Usage
Add as a remote of your repository:
git remote add toolchain https://github.com/brisberg/typescript-pkg.git
Merge changes from toolchain template into your repository. Be sure to manually keep any project specific overrides.
Latest directly from master:
git fetch toolchain --no-tags
git merge toolchain/master --allow-unrelated-histories
Or, latest stable release:
git fetch toolchain \
$(git ls-remote --tags --refs --sort=\"version:refname\" toolchain \
| awk -F/ 'END{print$NF}')
git merge FETCH_HEAD --allow-unrelated-histories
Note: Recommended to make a git alias
for the above command
Resolve merge conflicts, keeping project specific overrides and deletions.
Often simply discard and regenerate lockfile:
rm yarn.lock
yarn install
Verify tests still pass before committing:
yarn test
# Tests pass
git add .
git merge --continue
# Tests fail (debug or bail)
git merge --abort
Tools
- VSCode - Hackable IDE
- TypeScript - TypeScript language compiler
- Yarn - Package Manager of choice for node modules
- Jest - All-in-one test framework and assertion library
- ESLint - Pluggable lint for Javascript/TypeScript
- clang-format - Code Formatting library
CI
- GitHub Actions - CI Pipelines hosted by GitHub
Best Practices
- Keep-a-Changelog - Guide for maintaining a useful, readable Changelog.