{"id":13490040,"url":"https://github.com/yanhaijing/jslib-base","last_synced_at":"2025-05-14T06:12:01.525Z","repository":{"id":30098020,"uuid":"123895550","full_name":"yanhaijing/jslib-base","owner":"yanhaijing","description":"A modern JavaScript|Typescript library scaffolding, modularity, purity \u0026 extras","archived":false,"fork":false,"pushed_at":"2025-03-27T14:36:04.000Z","size":1399,"stargazers_count":959,"open_issues_count":5,"forks_count":149,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-05-09T13:58:54.236Z","etag":null,"topics":["boilerplate","js-libs","js-scaffold","jsmini","rollup","template","typescript","typescript-libs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yanhaijing.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"custom":["https://yanhaijing.com/mywallet/"]}},"created_at":"2018-03-05T09:24:30.000Z","updated_at":"2025-04-09T06:03:33.000Z","dependencies_parsed_at":"2023-11-19T16:24:43.483Z","dependency_job_id":"c2e4f66f-1dff-4423-956e-bc7432191db5","html_url":"https://github.com/yanhaijing/jslib-base","commit_stats":{"total_commits":301,"total_committers":15,"mean_commits":"20.066666666666666","dds":0.292358803986711,"last_synced_commit":"fab19206a538fef5b02c5a98cc788e3e2419426a"},"previous_names":[],"tags_count":49,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yanhaijing%2Fjslib-base","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yanhaijing%2Fjslib-base/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yanhaijing%2Fjslib-base/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yanhaijing%2Fjslib-base/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yanhaijing","download_url":"https://codeload.github.com/yanhaijing/jslib-base/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254080145,"owners_count":22011328,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["boilerplate","js-libs","js-scaffold","jsmini","rollup","template","typescript","typescript-libs"],"created_at":"2024-07-31T19:00:39.730Z","updated_at":"2025-05-14T06:12:01.468Z","avatar_url":"https://github.com/yanhaijing.png","language":"JavaScript","funding_links":["https://yanhaijing.com/mywallet/"],"categories":["JavaScript","boilerplate"],"sub_categories":[],"readme":"# [jslib-base](https://github.com/yanhaijing/jslib-base)\n\n[![](https://img.shields.io/badge/Powered%20by-jslib%20base-brightgreen.svg)](https://github.com/yanhaijing/jslib-base)\n[![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/yanhaijing/jslib-base/blob/master/LICENSE)\n[![npm](https://img.shields.io/badge/npm-3.0.6-orange.svg)](https://www.npmjs.com/package/@js-lib/cli)\n[![NPM downloads](http://img.shields.io/npm/dm/@js-lib/cli.svg?style=flat-square)](http://www.npmtrends.com/@js-lib/cli)\n[![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')\n![example workflow](https://github.com/yanhaijing/jslib-base/actions/workflows/ci.yml/badge.svg)\n\nEnglish | [简体中文](https://github.com/yanhaijing/jslib-base/blob/master/README.zh-CN.md)\n\nThe best `JS|TS` third-party library scaffold, quickly setup the basic framework of a `JS|TS` library in 10 seconds.\n\n**Libraries based on jslib-base can be shared on the [jsmini](https://github.com/jsmini) platform.**\n\n## :star: Features\n\n- **Interactive CLI for project initialization**\n- **Upgrade functionality** – Easily upgrade old libraries with one command\n- **Supports both JavaScript and TypeScript**\n- **Build \u0026 Packaging Solutions**\n  - TypeScript + Babel + Rollup\n  - Automatic third-party dependency injection (supports tree shaking)\n- **Multi-Environment Compatibility**\n  - Supports native browser script usage\n  - Provides UMD and ESM modules, compatible with Webpack, Vite, and other ecosystems\n  - Adapts to both old and new Node.js module systems (CommonJS + ESM)\n- **Code Style \u0026 Linting**\n  - ESLint + Prettier + Husky + Lint-Staged\n- **Unit Testing Suite**\n  - Mocha + Expect.js + Istanbul + NYC + Coveralls\n- **Commit Linting**\n  - Commitlint + Commitizen\n- **GitHub Actions**\n  - CI + Release\n- **Local Development Server**\n  - http-server\n\n## :rocket: User Guide\n\nTo create a new project, it is recommended to use Node.js version 18 or higher.\n\n```bash\n$ npx @js-lib/cli new mylib\n# Interactive queries, input project info\n$ cd mylib\n$ npm i\n```\n\nTo update the project, just execute the following command in the project root directory.\n\n```bash\n$ npx @js-lib/cli update\n```\n\nFor old projects, you can't directly execute the update command, you can first initialize a config file.\n\n```bash\n$ npx @js-lib/cli new -c\n```\n\nDirectory Overview\n\n```\n.\n├── demo Usage demo\n├── dist Compiled out code\n├── doc Project documents\n├── src Source code directory\n├── test Unit tests\n├── CHANGELOG.md Change log\n└── TODO.md To-do features\n```\n\nCommon command scripts\n\n```bash\n$ npm run lint\n$ npm run test\n$ npm run build\n$ npm run release\n$ npm publish\n```\n\n## Contribution Guide\n\nIf you only want to modify the library code generated by the CLI, you can directly edit the template code, which is simpler.\n\nAfter merging, I will migrate the template to the CLI. The template repository is as follows:\n\n- [jslib](https://github.com/yanhaijing/jslib)\n- [tslib](https://github.com/yanhaijing/tslib)\n\nThis project uses lerna to manage multiple plugins, common lerna commands are:\n\n```bash\n$ npx lerna init # Initialization\n$ npx lerna create @js-lib/todo # Create a package\n$ npx lerna add yargs --scope=@js-lib/cli # Install dependencies for a package\n$ npx lerna list # List all the packages\n$ npx lerna bootstrap # Install all dependencies\n$ npx lerna link # Create all links\n$ npx lerna changed # List the packages to be updated in the next release\n$ npx lerna publish # Release with tag, upload to git, upload to npm\n```\n\n## Contributors\n\n[contributors](https://github.com/yanhaijing/jslib-base/graphs/contributors)\n\n## Change Log\n\n[CHANGELOG.md](https://github.com/yanhaijing/jslib-base/blob/master/CHANGELOG.md)\n\n## TODO\n\n[TODO.md](https://github.com/yanhaijing/jslib-base/blob/master/TODO.md)\n\n## Current Users\n\n- [jsmini](https://github.com/jsmini)\n- [template.js](https://github.com/yanhaijing/template.js)\n- [shin-monitor](https://github.com/pwstrick/shin-monitor)\n- [baselib](https://github.com/LesixCoder/utils)\n- [streaming-json-js](https://github.com/karminski/streaming-json-js)\n- [better-js-lib](https://github.com/SFTC/better-js-lib)\n- [...](https://github.com/yanhaijing/jslib-base/issues/10)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyanhaijing%2Fjslib-base","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyanhaijing%2Fjslib-base","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyanhaijing%2Fjslib-base/lists"}