Skip to content

sandstromdev/generator-typescript-package

 
 

Repository files navigation

generator-typescript-package

License Build Status NPM Package NPM Downloads Code Coverage semantic-release

An opinionated yeoman generator for TypeScript packages with best practices

Features

Note: there has been no explicit compatibility testing for Windows development-environments

Install

npm install -g generator-typescript-package

Use

Create a directory for the new package, cd inside and generate the package skeleton with

yo typescript-package [--lerna] [--bin]
git commit -m 'Initial commit'

Finally, address each TODO: statement in the generated project.

Options

lerna

default: false

Generate a package in a lerna mono-repo. This package is expected to be built with TypeScript 3.0's build mode.

bin

default: false

Define an executable file under the bin section in the package.json.

Test

Test the generated package

npm test

Integrations

Continuous Integration

GitHub actions runs the .github/workflows/ci.yml action on every pull-request against the master, alpha, or beta branch.

To configure this behavior, customize the invoked npm run-scripts or the GitHub action itself.

Continuous Delivery

GitHub actions runs the .github/workflows/release.yml action on every push to the master, alpha, or beta branch.

This action uses the semantic-release GitHub action to create a new release and publish to npm, which requires the NPM_TOKEN Secret Variable.

Note that pushes to the alpha and beta branch create prereleases.

About

Yet another Yeoman generator for TypeScript packages

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 100.0%