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 🙏

© 2024 – Pkg Stats / Ryan Hefner

lib-tools

v2.0.4

Published

The lib-tools helps you simplify the build, bundle, test and npm packaging workflows for Typescript, JavaScript, Angular library projects and assets module projects.

Downloads

307

Readme

Lib Tools – Build, Test and NPM Package Workflows Make Easy

GitHub Actions Status Azure Pipelines Status npm version

The lib-tools helps you simplify the build, bundle, test and npm packaging workflows for Typescript, JavaScript, Angular library projects and assets module projects (e.g. sass, scss, css or icons). This tool can automatically set up for your projects without the time spent with webpack, rollup, karma, postcss, autoprefixer or clean-css configuration files. You can start from zero-configuration to fully customizable options!

Getting Started

Installation

You can install lib-tools cli either globally or locally.

npm install -D lib-tools

or install globally

npm install -g lib-tools

Latest npm package is npm version

Build/Bundle the Project(s)

To build/bundle the project(s) using workflow.json configuration file

lib build

Or, to automatically detect and build the project(s) without workflow.json configuration file

lib build --workflow=auto

To learn more about the build command options, see Build Command Usage wiki, or run

lib build --help

Test the Project(s)

To run the test(s) using workflow.json configuration file.

lib test

Or, to automatically detect and run the test(s) without workflow.json configuration file.

lib test --workflow=auto

To learn more about the test command options, see Test Command Usage wiki, or run

lib test --help

Configuration (workflow.json file)

The following is an example workflow.json configuration for building and testing the Typescript library project.

{
  "projects": {
    "demo-project": {
      "root": "./",
      "tasks": {
        "build": {
          "outputPath": "dist/demo-project",
          "script": {
            "compilations": [
              {
                "declaration": true,
                "target": "ES2015",
                "outDir": "esm2015",
                "esBundle": {
                  "outputFile": "fesm2015/demo-project.js"
                }
              },
              {
                "declaration": false,
                "target": "es5",
                "outDir": "esm5",
                "esBundle": true,
                "umdBundle": {
                  "outputFile": "bundles/demo-project.umd.js"
                }
              }
            ],
            "tsConfig": "tsconfig.build.json",
            "entry": "public_api.ts",
            "umdId": "demo",
            "peerDependenciesAsExternals": true,
            "dependenciesAsExternals": true,
            "externals": {
              "tslib": "tslib"
            }
          }
        },
        "test": {
          "karmaConfig": "karma.conf.js",
          "testIndexFile": "test/test.ts",
          "tsConfig": "tsconfig.test.json",
          "envOverrides": {
            "ci": {
              "reporters": [
                "junit",
                "coverage"
              ],
              "codeCoverageExclude": [
                "**/test.ts",
                "**/index.ts",
                "**/public_api.ts"
              ],
              "browsers": [
                "ChromeHeadlessCI"
              ],
              "singleRun": true
            }
          }
        }
      }
    }
  }
}

To learn more about workflow configuration, see Build Workflow Configuration and Test Workflow Configuration.

Docs

Examples

Some Projects Using Lib Tools

  • Typescript/JavaScript Projects

    • translit-js - General purpose transliterate service for JavaScript applications
    • myanmar-text-extractor-js - Burmese language (Myanmar text) extractor JavaScript library for word segmentation, text extraction or syllable break
    • zawgyi-unicode-translit-rules - Zawgyi Unicode transliterate / convert regular expression rules in JavaScript
  • Angular Projects

    • [ng-entity-change-checker][https://github.com/DagonMetric/ng-entity-change-checker] - Object dirty checker and modified properties detector for Angular
    • ng-config - Configuration and options service for Angular
    • ng-log - Vendor-agnostic logging, analytics and telemetry service abstractions and some implementations for Angular
    • ng-cache - Caching service for Angular
    • ng-zawgyi-detector - Zawgyi-One and standard Myanmar Unicode detector library for Angular

General Discussions

We’re using the following discussion channels as a place to connect with other members of our community.

Feedback and Contributing

Check out our Contributing page.

License

This repository is licensed with the MIT license.