/tsc-lib-starter

Primary LanguageJavaScriptBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

Initialize template

Auto init:

npm run init-tpl

or Manual init:

  1. Change git-hub-owner in:
    • README.md
    • package.json
  2. Change npm-package-name in:
    • README.md
    • package.json
    • package-lock.json
  3. Change lib-name in:
    • README.md
    • package.json
  4. Change license-holder in:
    • LICENSE
  5. Change lib-author and lib-author-email in:
    • package.json

After all - delete init.js file and remove this section from README.md file

lib-name

Typescript first BSD-3-Clause License badge NPM package badge Test and Build status badge

Description

Coverage

Statements Branches Functions Lines
Statements Branches Functions Lines

Table of Content:

  1. Usage
    1. Install npm package
    2. Import to your codebase
  2. API
    1. Properties
    2. Methods

Usage

Install npm package

npm i npm-package-name

Import to your codebase

By default, we distribute our lib as is - original TypeScript files, without transpiling to ES5 or ES6.

// Import original ts code
// but requires to be not exclude in `node_modules`.
// Check your `tsconfig.json`
import npmPackage from 'npm-package-name';

You can import compiled files from special folders.

// ES6: const, let, spread, rest and other modern JavaScript features
// but requires to be not exclude in `node_modules`.
// Check your `babebl-loader` (if your use webpack as bandler)
import npmPackage from 'npm-package-name/dist/es-6';
// or ES5: no ES6 features but ready for use as is, without transpiling
import npmPackage from 'npm-package-name/dist/es-5';

API

Properties

describe

Methods

describe