Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ije/publish
Publish your module with one command in Deno.
https://github.com/ije/publish
deno package publish
Last synced: 3 months ago
JSON representation
Publish your module with one command in Deno.
- Host: GitHub
- URL: https://github.com/ije/publish
- Owner: ije
- License: mit
- Created: 2020-10-16T13:36:50.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-04-07T02:55:04.000Z (10 months ago)
- Last Synced: 2024-10-03T13:22:10.624Z (4 months ago)
- Topics: deno, package, publish
- Language: TypeScript
- Homepage: https://deno.land/x/publish
- Size: 34.2 KB
- Stars: 20
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Publish
Create git tag(version) and push to remote without any hassle.
### Installation
```bash
deno install --allow-read --allow-write --allow-run -f -n publish https://deno.land/x/[email protected]/cli.ts
```or use [land](https://deno.land/x/land) without installation:
```
land publish
```### Usage
```bash
$ cd $YOUR_PROJECT_DIR
$ publish
> 1.0.1
1.1.0
2.0.0
1.0.0-alpha.1
1.0.0-beta.1
1.0.0-rc.1
▏
```**Publish** will create a `version.ts` file in your project root directory if it doesn't exist.
```ts
export const VERSION = '1.0.0'
```### Hook Functions
You can add hook functions in the `version.ts` to do some tasks before or after publish.
```ts
/** `prepublish` will be invoked before publish, return `false` to prevent the publish. */
export function prepublish(version: string) {
console.log('on prepublish', version)
}/** `postpublish` will be invoked after published. */
export function postpublish(version: string) {
console.log('on postpublish', version)
}
```