-
Notifications
You must be signed in to change notification settings - Fork 3
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
Showing
8 changed files
with
37 additions
and
43 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,4 +34,4 @@ jobs: | |
run: ni --frozen | ||
|
||
- name: Lint | ||
run: nr check | ||
run: nr checkAll |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env node | ||
import { release, changelog } from '../dist/index.js' | ||
import { Command } from 'commander' | ||
|
||
const program = new Command() | ||
|
||
program | ||
.command('release') | ||
.option('-r --remote <remote>', 'Remote name') | ||
.description('Release all packages and generate changelogs') | ||
.action(async (options) => release(options)) | ||
|
||
program | ||
.command('changelog') | ||
.option('-rc --releaseCount <releaseCount>', 'Release count') | ||
.option('-f --file <file>', 'Changelog filename') | ||
.description('Generate changelog') | ||
.action(async (options) => changelog(options)) | ||
|
||
program.parse() |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -2,7 +2,14 @@ | |
"name": "@varlet/release", | ||
"type": "module", | ||
"version": "0.0.0", | ||
"description": "", | ||
"description": "release all packages and generate changelogs", | ||
"keywords": [ | ||
"varlet", | ||
"release", | ||
"changelog" | ||
], | ||
"author": "clencat <[email protected]>", | ||
"license": "MIT", | ||
"main": "./dist/index.js", | ||
"module": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
|
@@ -14,17 +21,14 @@ | |
} | ||
}, | ||
"bin": { | ||
"vr": "bin/index.mjs" | ||
"vr": "bin/index.js" | ||
}, | ||
"scripts": { | ||
"build": "tsc --noEmit && tsup", | ||
"dev": "node bin/index.mjs", | ||
"dev": "node bin/index.js", | ||
"test": "pnpm run build && pnpm run dev", | ||
"check": "tsc --noEmit && eslint --ext .ts,.mjs" | ||
"checkAll": "tsc --noEmit && eslint --ext .ts,.js" | ||
}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "MIT", | ||
"packageManager": "[email protected]", | ||
"engines": { | ||
"node": ">=16.0.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
This file was deleted.
Oops, something went wrong.
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,22 +1,4 @@ | ||
import { release } from './release' | ||
import { changelog } from './changelog' | ||
import { type Command } from 'commander' | ||
|
||
function releaseCommand(program: Command) { | ||
program | ||
.command('release') | ||
.option('-r --remote <remote>', 'Remote name') | ||
.description('Release all packages and generate changelogs') | ||
.action(async (options) => release(options)) | ||
} | ||
|
||
function changelogCommand(program: Command) { | ||
program | ||
.command('changelog') | ||
.option('-rc --releaseCount <releaseCount>', 'Release count') | ||
.option('-f --file <file>', 'Changelog filename') | ||
.description('Generate changelog') | ||
.action(async (options) => changelog(options)) | ||
} | ||
|
||
export { release, changelog, releaseCommand, changelogCommand } | ||
export { release, changelog } |
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