/jslib-base

A modern JavaScript|Typescript library scaffolding, modularity, purity & extras

Primary LanguageJavaScriptMIT LicenseMIT

license npm NPM downloads Percentage of issues still open

English | 简体中文

The best third party JS|TS library scaffold. fast to create the framework for building a new library.

The library that based jslib-base can be shared to the jsmini platform

Characteristics

  • jslib commander all in one
  • Coded in ES6+ or TypeScript, easily compile and generate production code
  • Third parties rely on automatic injection(Tree shaking)
  • Supports multi environment, including default browsers, Node, AMD, CMD, Webpack, Rollup, Fis and so on.
  • Integrated code style lint(eslint).
  • Integrated unit test environment(mocha).
  • Integrated test coverage(istanbul+nyc).
  • Integrated continuous integration tool travis-ci
  • Supports sideEffects
  • Integrated Issue template
  • Integrated jsmini

Usage Instructions

Using npm, install global jslib(node >= 6.0)

$ npm i -g @js-lib/cli

Or use the npx command to skip the install

$ npx @js-lib/cli new

create a new lib

$ jslib new mylib
# input something
$ cd mylib
$ npm i

To update the old lib

$ jslib update

For older projects, the update command cannot be executed directly. Instead, a configuration file can be initialized first

$ jslib new -c

Directory

├── demo - Using demo
├── dist - Compiler output code
├── doc - Project documents
├── src - Source code directory
├── test - Unit tests
├── CHANGELOG.md - Change log
└── TODO.md - Planned features

The npm scripts

$ npm run lint
$ npm run test
$ npm run build
$ npm run release
$ npm publish

Contribution Guide

This project use lerna to manage mutil plugins

First, to install lerna

$ npm install -g lerna@3.16.4

Some commands of lerna

$ lerna init
$ lerna create @js-lib/todo
$ lerna add yargs --scope=@js-lib/cli
$ lerna list
$ lerna bootstrap
$ lerna link
$ lerna changed
$ lerna publish

Contributors

contributors

Change Log

CHANGELOG.md

TODO

TODO.md

Current Users

Relative links