Home

Awesome

builder-ts-library

npm version

Typescript Library archetype for builder. It brings a lot of features that help you to make a typescript library (publishable to npm).

It is used by retax Please check this project to understand how to use these builder tasks.

Getting started

You could check builder if you want to understand how it works.

npm install --save-dev builder
npm install --save builder-ts-library
npm install --save-dev builder-ts-library
# .builderrc
---
archetypes:
  - builder-ts-library

Tasks

Build

Build on change

Test

Typings

Linters

Release the component

Builder Help

$ builder help builder-ts-library
Usage:

  builder <action> <task(s)>

Actions:

  run, concurrent, envs, help

Tasks:

  build:commonjs
    [builder-ts-library] gulp --cwd . --gulpfile node_modules/builder-ts-library/config/gulp/gulpfile.js build-es5

  build:commonjs:watch
    [builder-ts-library] gulp --cwd . --gulpfile node_modules/builder-ts-library/config/gulp/gulpfile.js watch-es5

  build:es
    [builder-ts-library] gulp --cwd . --gulpfile node_modules/builder-ts-library/config/gulp/gulpfile.js build-es2015

  build:es:watch
    [builder-ts-library] gulp --cwd . --gulpfile node_modules/builder-ts-library/config/gulp/gulpfile.js watch-es2015

  build:typescript
    [builder-ts-library] rimraf ./libTs && tsc -p .

  build:typescript:watch
    [builder-ts-library] tsc --project . --watch

  build:watch
    [builder-ts-library] builder concurrent build:typescript:watch build:commonjs:watch build:es:watch

  test:all
    [builder-ts-library] BABEL_ENV=commonjs jest --config node_modules/builder-ts-library/config/jest/config.json --colors

  test:all:coverage
    [builder-ts-library] BABEL_ENV=commonjs jest --config node_modules/builder-ts-library/config/jest/config.coverage.json --colors

  test:all:watch
    [builder-ts-library] BABEL_ENV=commonjs jest --config node_modules/builder-ts-library/config/jest/config.json --watch --watchExtensions ts,tsx,js --colors

  typings:install
    [builder-ts-library] typings install

  build
    [builder-ts-library] builder concurrent build:typescript build:commonjs build:es

  eslint
    [builder-ts-library] eslint --color 'src/**/*.{js,jsx}'

  lint
    [builder-ts-library] builder concurrent eslint tslint

  prepublish
    [builder-ts-library] npm run builder:compile

  release
    [builder-ts-library] node node_modules/builder-ts-library/lib/index release

  tslint
    [builder-ts-library] tslint -c tslint.json 'src/**/*.{ts,tsx}'