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
Maintainers
Readme
Lib Tools – Build, Test and NPM Package Workflows Make Easy
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
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
Build
Test
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.