Giter Site home page Giter Site logo

typescript-lib-starter's Introduction

TypeScript Lib Starter TypeScript Lib Starter

GitHub CI TypeScript 4.0 prettier ESLlint node-tap

Starter kit for modern TypeScript libraries. Generates JavaScript ready to be published on npm.

Batteries included. Period.

Clone the repo

$ git clone [email protected]:fox1t/typescript-lib-starter.git {your_project_name}

$ cd {your_project_name}

Remove reference to this starter and re-init package.json

$ rm -rf .git && git init && npm init

Install development dependencies

$ npm i

Add remote origin and make initial commit

$ git remote add origin [email protected]:{your_repository}.git

$ git add .

$ git commit -m "Initial commit"

$ git push -u origin master

Scripts

  • npm run build: build TypeScript sources to dist directory
  • npm publish: builds and publishes lib to npmjs.com
  • npm test: run tests in ./test directory using tap
  • npm run test:watch: watches ./src/ and ./test/ folders and restarts compilation and tests
  • npm run test:report: saves test report to out.tap file
  • npm run test:reporter: converts out.tap file to junit

External typings augmentation

This starter is already configured to allow you to extend typings of external packages. The logic behind it is based on this official template. To augment a module, just create a folder with the same name as the module you are augmenting and add an index.d.ts in it. Here you can find a real world example.

Automatic Test and Code Coverage

Includes azure-pipelines.yml configuration file. You can build, test and publish code coverage on Azure DevOps for free with GitHub integration for OSS projects.

Dev Dependencies

  • husky: runs precommit lint hook
  • rimraf: removes lib folder crossplatform
  • chokidar-cli: file watcher
  • tap: test runner
  • tap-mocha-reporter: mocha reporter for tap
  • ts-node: runs tests without compiling
  • prettier
  • eslint
  • eslint-config-prettier: makes ESLint work nice with prettier
  • typescript

Spread the word

If you use this starter, add this badge to your project to help standardising TS library development.

[![built with typescript-lib-starter](https://img.shields.io/badge/built%20with-typescript--lib--starter%20-blue.svg)](https://github.com/fox1t/typescript-lib-starter)

built with typescript-lib-starter

Node.js libraries built with TypeScript Lib Starter

License

MIT

typescript-lib-starter's People

Contributors

alemagio avatar fox1t avatar huafu avatar matteovivona avatar nclbaz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

typescript-lib-starter's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.