brisberg / cruft-typescript-pkg

TypeScript NPM package project template definition. Powered by Cruft

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeScript Npm Package (Template)

Standard project configuration template for @brisberg TypeScript NPM packages.

This is an opinionated toolchain configuration for TypeScript packages published to NPM Registry. Powered by Cookiecutter template engine, meant to be distributed with Cruft.

Usage

Besure to install cruft:

pip3 install cruft

Setup

In a new repository:

cruft create https://github.com/brisberg/cruft-typescript-pkg/

In an existing repository:

# Link the repo to the bare template
cruft link https://github.com/brisberg/cruft-typescript-pkg -c v0.0.0
# Update to desired release to apply all the changes
cruft update (-c v1.1.0)

Be sure to keep any project specific config changes.

Update

Check if there are updates upstream:

cruft check

Update to latest:

# Update to latest commit
cruft update
# Update to specific release tag
cruft update -c v1.1.0

Resolve merge conflicts, keeping project specific overrides and deletions.

Verify tests still pass before committing:

yarn test
# Tests pass
git add .
git commit

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

Best Practices

About

TypeScript NPM package project template definition. Powered by Cruft

License:MIT License


Languages

Language:JavaScript 79.1%Language:TypeScript 20.9%