Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,8 @@ jobs:
node -e '
const fs = require("node:fs");
const pkg = JSON.parse(fs.readFileSync("package.json", "utf8"));
if (!pkg.name.startsWith("@")) {
pkg.name = `@${process.env.GITHUB_REPOSITORY_OWNER.toLowerCase()}/${pkg.name}`;
fs.writeFileSync("package.json", JSON.stringify(pkg, null, 2) + "\n");
}
const baseName = pkg.name.includes("/") ? pkg.name.split("/")[1] : pkg.name;
pkg.name = `@${process.env.GITHUB_REPOSITORY_OWNER.toLowerCase()}/${baseName}`;
fs.writeFileSync("package.json", JSON.stringify(pkg, null, 2) + "\n");
'
npm publish --registry=https://npm.pkg.github.com
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
## Installation

```bash
npm install gitcontext
npm install @utkarsh2325/git-context
```

Node.js 20 or later and the `git` executable are required.

## Quick Start

```ts
import { git } from "git-context";
import { git } from "@utkarsh2325/git-context";

const context = git();

Expand Down
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"name": "gitcontext",
"name": "@utkarsh2325/git-context",
"version": "0.6.0",
"description": "Know your Git state from inside Node.js.",
"publishConfig": {
"access": "public"
},
"keywords": [
"git",
"context",
Expand All @@ -22,8 +25,8 @@
}
},
"bin": {
"gitcontext": "./dist/cli.js",
"git-context": "./dist/cli.js"
"gitcontext": "dist/cli.js",
"git-context": "dist/cli.js"
},
"files": [
"dist",
Expand Down
Loading