Skip to content

Commit 3a4d6f7

Browse files
feat: change product name
1 parent 8331cff commit 3a4d6f7

File tree

4 files changed

+46
-32
lines changed

4 files changed

+46
-32
lines changed

README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Git Markdown Diff Tool
1+
# GitLoom Diff
22

3-
[![npm version](https://badge.fury.io/js/git-markdown-diff.svg)](https://www.npmjs.com/package/git-markdown-diff)
3+
[![npm version](https://badge.fury.io/js/gitloom-diff.svg)](https://www.npmjs.com/package/gitloom-diff)
44
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5-
[![Node.js Version](https://img.shields.io/node/v/git-markdown-diff.svg)](https://nodejs.org)
5+
[![Node.js Version](https://img.shields.io/node/v/gitloom-diff.svg)](https://nodejs.org)
66

77
**Stop squinting at those git provider diff views.** Generate beautiful, searchable, IDE-friendly git diffs in markdown format.
88

@@ -11,13 +11,13 @@
1111
## Quick Start
1212

1313
```bash
14-
npm install -g git-markdown-diff
14+
npm install -g gitloom-diff
1515

1616
# Basic usage
17-
git-markdown-diff
17+
gitloom-diff
1818

1919
# Compare branches
20-
git-markdown-diff -s feature/awesome -e main
20+
gitloom-diff -s feature/awesome -e main
2121
```
2222

2323
## Why You'll Love This
@@ -96,19 +96,19 @@ GitHub, GitLab, or any other git provider diffs can be hard to parse - especiall
9696

9797
```bash
9898
# Compare commits
99-
git-markdown-diff -s abc123 -e def456
99+
gitloom-diff -s abc123 -e def456
100100

101101
# Compare branches
102-
git-markdown-diff -s feature/branch -e main
102+
gitloom-diff -s feature/branch -e main
103103

104104
# Compare tags
105-
git-markdown-diff -s v1.1.0 -e v1.0.0
105+
gitloom-diff -s v1.1.0 -e v1.0.0
106106

107107
# Compare with remote
108-
git-markdown-diff -s origin/main -e main
108+
gitloom-diff -s origin/main -e main
109109

110110
# Compare staged changes
111-
git-markdown-diff -s HEAD -e --staged
111+
gitloom-diff -s HEAD -e --staged
112112
```
113113

114114
### Configuration
@@ -128,13 +128,13 @@ Options:
128128

129129
```bash
130130
# Side-by-side diff with custom output
131-
git-markdown-diff -s main -e develop -o pr-123-diffs -f side-by-side
131+
gitloom-diff -s main -e develop -o pr-123-diffs -f side-by-side
132132

133133
# Exclude patterns
134-
git-markdown-diff --exclude "*.test.js" "docs/**"
134+
gitloom-diff --exclude "*.test.js" "docs/**"
135135

136136
# Multiple options
137-
git-markdown-diff \
137+
gitloom-diff \
138138
-s feature/new-ui \
139139
-e develop \
140140
-o ui-changes \
@@ -146,9 +146,9 @@ git-markdown-diff \
146146
## Programmatic Usage
147147

148148
```javascript
149-
const GitMarkdownDiff = require('git-markdown-diff');
149+
const GitLoomDiff = require('gitloom-diff');
150150

151-
const differ = new GitMarkdownDiff({
151+
const differ = new GitLoomDiff({
152152
outputDir: 'custom-dir',
153153
exclusions: ['*.log'],
154154
diffFormat: 'side-by-side',
@@ -163,21 +163,21 @@ await differ.run('main', 'feature/branch');
163163
```javascript
164164
// Code Review Tool Integration
165165
async function generateReviewDiff(prNumber) {
166-
const differ = new GitMarkdownDiff({
166+
const differ = new GitLoomDiff({
167167
outputDir: `pr-${prNumber}-diff`
168168
});
169169
await differ.run('main', `pr-${prNumber}`);
170170
}
171171

172172
// Git Hook Integration
173173
async function preCommitHook() {
174-
const differ = new GitMarkdownDiff();
174+
const differ = new GitLoomDiff();
175175
await differ.run('HEAD', '--staged');
176176
}
177177

178178
// CI/CD Pipeline
179179
async function generatePRDiff() {
180-
const differ = new GitMarkdownDiff({
180+
const differ = new GitLoomDiff({
181181
exclusions: ['*.lock', 'dist/*']
182182
});
183183
await differ.run(process.env.TARGET_BRANCH, process.env.PR_BRANCH);

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2-
"name": "git-markdown-diff",
3-
"version": "0.0.41",
2+
"name": "gitloom-diff",
3+
"version": "0.0.42",
44
"description": "Git diff tool that outputs markdown formatted diffs",
5-
"main": "src/sdk/GitMarkdownDiff.js",
5+
"main": "src/sdk/GitLoomDiff.js",
66
"bin": {
7-
"git-markdown-diff": "./src/cli/index.js"
7+
"gitloom-diff": "./src/cli/index.js"
88
},
99
"scripts": {
1010
"test": "echo \"Error: no test specified\" && exit 1"
@@ -25,20 +25,20 @@
2525
"src/cli/**/*"
2626
],
2727
"exports": {
28-
".": "./src/sdk/GitMarkdownDiff.js"
28+
".": "./src/sdk/GitLoomDiff.js"
2929
},
3030
"dependencies": {
3131
"commander": "^11.0.0",
3232
"ora": "^8.1.1"
3333
},
3434
"repository": {
3535
"type": "git",
36-
"url": "git+https://github.com/bayuagpr/git-markdown-diff.git"
36+
"url": "git+https://github.com/bayuagpr/gitloom-diff.git"
3737
},
3838
"bugs": {
39-
"url": "https://github.com/bayuagpr/git-markdown-diff/issues"
39+
"url": "https://github.com/bayuagpr/gitloom-diff/issues"
4040
},
41-
"homepage": "https://github.com/bayuagpr/git-markdown-diff#readme",
41+
"homepage": "https://github.com/bayuagpr/gitloom-diff#readme",
4242
"engines": {
4343
"node": ">=18"
4444
}

src/cli/index.js

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,30 @@
11
#!/usr/bin/env node
22

33
const { program } = require("commander");
4-
const GitMarkdownDiff = require("../sdk/GitMarkdownDiff");
4+
const GitLoomDiff = require("../sdk/GitLoomDiff");
55

66
program
7-
.name("git-markdown-diff")
7+
.name("gitloom-diff")
88
.description("Generate markdown-formatted git diffs")
99
.option("-s, --start-ref <ref>", "Starting reference (commit hash, branch name, or tag)")
1010
.option("-e, --end-ref <ref>", "Ending reference (commit hash, branch name, or tag)")
1111
.option("-o, --output <dir>", "Output directory", "git-diffs")
1212
.option("--exclude <patterns...>", "Additional file patterns to exclude")
1313
.option("-f, --format <format>", "Diff format (diff, unified, side-by-side)", "diff")
1414
.option("--light-mode", "Use light mode theme instead of dark mode")
15+
.addHelpText('after', `
16+
Examples:
17+
# Basic usage (current branch vs main)
18+
$ gitloom-diff
19+
20+
# Compare branches
21+
$ gitloom-diff -s feature/awesome -e main
22+
23+
# Compare tags
24+
$ gitloom-diff -s v1.1.0 -e v1.0.0
25+
26+
# Side-by-side diff with custom output
27+
$ gitloom-diff -s main -e develop -o pr-diffs -f side-by-side`)
1528
.action(async (options) => {
1629
const config = {
1730
outputDir: options.output,
@@ -20,7 +33,7 @@ program
2033
darkMode: !options.lightMode
2134
};
2235

23-
const differ = new GitMarkdownDiff(config);
36+
const differ = new GitLoomDiff(config);
2437
await differ.run(options.startRef, options.endRef);
2538
});
2639

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ const gitUtils = require('./utils/gitUtils');
22
const fsUtils = require('./utils/fsUtils');
33
const Config = require('./config/Config');
44

5-
class GitMarkdownDiff {
5+
class GitLoomDiff {
66
constructor(options = {}) {
77
this.config = new Config(options);
88
}
99

10+
1011
async run(startRange, endRange) {
1112
const { default: ora } = await import("ora");
1213
const spinner = ora("Generating markdown diffs...").start();
@@ -99,4 +100,4 @@ class GitMarkdownDiff {
99100
}
100101
}
101102

102-
module.exports = GitMarkdownDiff;
103+
module.exports = GitLoomDiff;

0 commit comments

Comments
 (0)