Git Product home page Git Product logo

jslib-base's Introduction

license npm NPM downloads Percentage of issues still open

English | 简体中文

The best JS|TS third-party library scaffold, quickly setup the basic framework of a new library in 10 seconds.

Libraries based on jslib-base can be shared on the jsmini platform.

⭐ Features

  • Command-line tool for quick creation and seamless upgrades
  • Supports writing source code in ES6+ or TypeScript, and compiles to generate production code
  • Auto-injection of third-party dependencies (automatically removes unnecessary code in third-party dependencies through tree shaking)
  • Supports multiple environments (native browser, AMD, CMD, Webpack, Rollup, vite, fis, Node.js, etc.)
  • Integrated code style checker (eslint + prettier + husky)
  • Integrated unit test environment (mocha)
  • Integrated test coverage report (istanbul+nyc)
  • Integrated continuous integration tool github action
  • Integrated with jsmini

🚀 User Guide

To create a new project, Node 14+ is recommended.

$ npx @js-lib/cli new mylib
# Interactive queries, input project info
$ cd mylib
$ npm i

To update the project, just execute the following command in the project root directory.

$ npx @js-lib/cli update

For old projects, you can't directly execute the update command, you can first initialize a config file.

$ npx @js-lib/cli new -c

Directory Overview

.
├── demo Usage demo
├── dist Compiled out code
├── doc Project documents
├── src Source code directory
├── test Unit tests
├── CHANGELOG.md Change log
└── TODO.md To-do features

Common command scripts

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

Contribution Guide

This project uses lerna to manage multiple plugins, common lerna commands are:

$ npx lerna init # Initialization
$ npx lerna create @js-lib/todo # Create a package
$ npx lerna add yargs --scope=@js-lib/cli # Install dependencies for a package
$ npx lerna list # List all the packages
$ npx lerna bootstrap # Install all dependencies
$ npx lerna link # Create all links
$ npx lerna changed # List the packages to be updated in the next release
$ npx lerna publish # Release with tag, upload to git, upload to npm

Contributors

contributors

Change Log

CHANGELOG.md

TODO

TODO.md

Current Users

Relative links

jslib-base's People

Contributors

yanhaijing avatar houce avatar logan70 avatar yugasun avatar en777 avatar sidkwok avatar bigmeow avatar alanoooaao avatar superbug avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.