0-60

中文文档
2.1.0发布于 2021/11/25MITESM + CJS

clone a skeleton repo and set up CI build as fast as possible

原始使用文档
文档目录4 节
  1. Cloning a skeleton repository
  2. Pick from preset list of skeleton repos
  3. Preparing for CI build
  4. Bringing in changes to the skeleton

0-60

CircleCI Coverage Status semantic-release Commitizen friendly npm version

This is my script for creating an npm package from a skeleton project and setting up the CI build as fast as possible. Once you've used this you'll never want to go back to setting up all of that stuff manually.

Installation

yarn global add 0-60

Or if you want you can run it with npx:

npx 0-60

CLI

Cloning a skeleton repository

0-60 clone <REPO URL>[#<BRANCH>]

0-60 will prompt you for the new package name, organization, etc:

$ 0-60 clone https://github.com/jedwards1211/es2015-library-skeleton.git
? Destination directory: cool-project
Cloning into 'cool-project'...
remote: Enumerating objects: 182, done.
remote: Counting objects: 100% (182/182), done.
remote: Compressing objects: 100% (41/41), done.
remote: Total 1078 (delta 162), reused 150 (delta 140), pack-reused 896
Receiving objects: 100% (1078/1078), 586.17 KiB | 2.78 MiB/s, done.
Resolving deltas: 100% (724/724), done.
? Package name: cool-project
? Package description: made with 0-60!
? Package author: Andy Edwards
? Package keywords: foo,bar
? GitHub organization: jedwards1211
? GitHub repo: cool-project
Installing dependencies...
yarn install v1.13.0
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 🔨  Building fresh packages...
✨  Done in 9.17s.
Ready to go!

Pick from preset list of skeleton repos

You don't have to type the repository URL every time. Instead you can configure a preset list of repositories to pick from by adding them to ~/.0-60.json. Then just run 0-60 without arguments, and outside of a repo directory. 0-60 will prompt you to select which skeleton you want from this list.

Example ~/.0-60.json:

{
  "skeletons": [
    "jedwards1211/es2015-library-skeleton",
    "jedwards1211/react-library-skeleton",
    "jedwards1211/react-karma-library-skeleton",
    "jedwards1211/untranspiled-js-library-skeleton",
    "jedwards1211/typescript-library-skeleton",
    "jedwards1211/typescript-library-skeleton#pnpm"
  ]
}
$ 0-60
? Skeleton repo: (Use arrow keys)
❯ jedwards1211/es2015-library-skeleton
  jedwards1211/react-library-skeleton
  jedwards1211/react-karma-library-skeleton
  jedwards1211/untranspiled-js-library-skeleton
  jedwards1211/typescript-library-skeleton
  jedwards1211/typescript-library-skeleton#pnpm

Preparing for CI build

Running 0-60 inside in your repo directory will:

  • Create the repository on GitHub
  • enable Travis CI (if .travis.yml is present)

Bringing in changes to the skeleton

Just run git pull skeleton master (0-60 keeps the skeleton repository URL in the skeleton remote). I recommend using the CLI in my fork of merge-package.json to automatically fix merge conflicts in package.json. (Install with npm i -g jedwards1211/merge-package.json#cli and then just run merge-package.json in the project directory after pulling.)

版本与发布记录

0-60 共发布 13 个版本,首次发布于 2019/02/06;过去 12 个月发布了 0 个版本。

版本发布日期距今
2.1.0latest2021/11/254 年前
2.0.92020/10/286 年前
2.0.82020/06/026 年前
2.0.72020/04/116 年前
2.0.62020/04/106 年前
2.0.52020/02/236 年前

关于 0-60 的常见问题

0-60 是什么?

克隆骨架repo并尽快设置CI构建

如何安装 0-60?

在项目目录运行 npm install 0-60,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 060、0-60,可以用 npx 060 直接运行。

0-60 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/0-60 是否存在。

0-60 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

0-60 可以商用吗?

0-60 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

0-60 还在维护吗?

最新版本 2.1.0 发布于 2021/11/25(4 年前);至今共发布 13 个版本,其中过去 12 个月发布了 0 个;首次发布于 2019/02/06。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。