Skip to content
프로젝트

소개

모던한 JavaScript|Typescript 라이브러리 스캐폴딩으로, 모듈성·순수성 등의 기능을 제공합니다.

개발 도구

이 수치를 측정하는 방법

What you can do

  • Interactive CLI for project initialization
  • Upgrade functionality – Easily upgrade old libraries with one command
  • Supports both JavaScript and TypeScript
  • TypeScript + Babel + Rollup

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
-1
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

jslib-base

license npm NPM downloads Percentage of issues still open example workflow

English | 简体中文

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

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

:star: Features

  • Interactive CLI for project initialization
  • Upgrade functionality – Easily upgrade old libraries with one command
  • Supports both JavaScript and TypeScript
  • Build & Packaging Solutions
    • TypeScript + Babel + Rollup
    • Automatic third-party dependency injection (supports tree shaking)
  • Multi-Environment Compatibility
    • Supports native browser script usage
    • Provides UMD and ESM modules, compatible with Webpack, Vite, and other ecosystems
    • Adapts to both old and new Node.js module systems (CommonJS + ESM)
  • Code Style & Linting
    • ESLint + Prettier + Husky + Lint-Staged
  • Unit Testing Suite
    • Mocha + Expect.js + Istanbul + NYC + Coveralls
  • Commit Linting
    • Commitlint + Commitizen
  • GitHub Actions
    • CI + Release
  • Local Development Server
    • http-server

:rocket: User Guide

To create a new project, it is recommended to use Node.js version 18 or higher.

$ 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

If you only want to modify the library code generated by the CLI, you can directly edit the template code, which is simpler.

After merging, I will migrate the template to the CLI. The template repository is as follows:

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

관련 프로젝트 살펴보기

불러오는 중…