npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

builder-ts-library

v0.0.6

Published

Builder Archetype - Typescript Library

Downloads

13

Readme

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

  • builder run build:commomjs: Compile the library to ES5. Commonjs module compatible. The output folder is ./lib
  • builder run build:es: Compile the library to ES5. ES2015 module compatible. The output folder is ./es
  • builder run build:typescript: Compile the library to ES2015. ES2015 module compatible. The output folder is ./libTS and generate typescript definition files
  • builder run build: Execute the 3 previous tasks in parallel

Build on change

  • builder run build:commomjs:watch: Same as builder run build:commonjs in watch mode
  • builder run build:es:watch: Same as builder run build:es in watch mode
  • builder run build:typescript:watch: Same as builder run build:typescript in watch mode
  • builder run build:watch: Execute the 3 previous tasks in parallel

Test

  • builder run test:all: Test the library once
  • builder run test:all:watch: Test the library once and enter in watch mode (usefull for tdd)
  • builder run test:all:coverage: Test the library and generate test coverage

Typings

  • builder run typings:install: Install type definition files

Linters

  • builder run eslint: Run eslint on the project
  • builder run tslint: Run tslint on the project
  • builder run lint: Run the 2 previous tasks

Release the component

  • builder run release -- semverCompatibleVersion: Only if you are using git flow. Create a release of the component. semverCompatipleVersion must be valid according to semver This will update package.json and create a git flow release

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}'