-
-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6de5337
commit 4c763e1
Showing
121 changed files
with
33,815 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
node_modules | ||
package-lock.json | ||
packages/*/package-lock.json | ||
.DS_Store | ||
.eslintcache | ||
temp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
# 变更日志 | ||
|
||
## 3.0.0 / 2025-1-4 | ||
|
||
- 架构升级,由 module 升级为 template | ||
- 去除 lang 参数 | ||
- 交互文案迁移为英文 | ||
|
||
## 2.3.4 / 2023-11-19 | ||
|
||
- fix: 升级 [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,5 +4,5 @@ | |
"packages": [ | ||
"packages/*" | ||
], | ||
"version": "2.3.4" | ||
"version": "3.0.0-alpha.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,109 @@ | ||
# `@js-lib/cli` | ||
# [jslib-base](https://github.com/yanhaijing/jslib-base) | ||
|
||
The best third party JS|TS library scaffold. [Click for more information](https://github.com/yanhaijing/jslib-base#readme). | ||
[![](https://img.shields.io/badge/Powered%20by-jslib%20base-brightgreen.svg)](https://github.com/yanhaijing/jslib-base) | ||
[![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/yanhaijing/jslib-base/blob/master/LICENSE) | ||
[![npm](https://img.shields.io/badge/npm-3.0.0-orange.svg)](https://www.npmjs.com/package/@js-lib/cli) | ||
[![NPM downloads](http://img.shields.io/npm/dm/@js-lib/cli.svg?style=flat-square)](http://www.npmtrends.com/@js-lib/cli) | ||
[![Percentage of issues still open](http://isitmaintained.com/badge/open/yanhaijing/jslib-base.svg)](http://isitmaintained.com/project/yanhaijing/jslib-base 'Percentage of issues still open') | ||
![example workflow](https://github.com/yanhaijing/jslib-base/actions/workflows/ci.yml/badge.svg) | ||
|
||
English | [简体中文](https://github.com/yanhaijing/jslib-base/blob/master/README.zh-CN.md) | ||
|
||
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](https://github.com/jsmini) platform.** | ||
|
||
## :star: 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, commonjs, 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](https://github.com/jsmini) | ||
|
||
## :rocket: User Guide | ||
|
||
To create a new project, it is recommended to use Node.js version 18 or higher. | ||
|
||
```bash | ||
$ 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. | ||
|
||
```bash | ||
$ npx @js-lib/cli update | ||
``` | ||
|
||
For old projects, you can't directly execute the update command, you can first initialize a config file. | ||
|
||
```bash | ||
$ 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 | ||
|
||
```bash | ||
$ 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: | ||
|
||
```bash | ||
$ 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](https://github.com/yanhaijing/jslib-base/graphs/contributors) | ||
|
||
## Change Log | ||
|
||
[CHANGELOG.md](https://github.com/yanhaijing/jslib-base/blob/master/CHANGELOG.md) | ||
|
||
## TODO | ||
|
||
[TODO.md](https://github.com/yanhaijing/jslib-base/blob/master/TODO.md) | ||
|
||
## Current Users | ||
|
||
- [jsmini](https://github.com/jsmini) | ||
- [template.js](https://github.com/yanhaijing/template.js) | ||
- [...](https://github.com/yanhaijing/jslib-base/issues/10) | ||
|
||
## Relative links | ||
|
||
- [Lerna 中文教程详解](https://juejin.im/post/5ced1609e51d455d850d3a6c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.