File tree Expand file tree Collapse file tree 5 files changed +21
-12
lines changed Expand file tree Collapse file tree 5 files changed +21
-12
lines changed Original file line number Diff line number Diff line change 11import { Command } from 'commander' ;
22import chalk from 'chalk' ;
3- import * as utils from '../utils' ;
3+ import * as utils from '../../ utils' ;
44import fs from 'node:fs' ;
55
66export function addCommand ( program : Command ) : void {
Original file line number Diff line number Diff line change 1+ import { Command } from 'commander' ;
2+ import { addCommand } from './add' ;
3+ import { pullCommand } from './pull' ;
4+ import { rebuildCommand } from './rebuild' ;
5+
6+ export function subtreeCommand ( program : Command ) : void {
7+ const subtree = program
8+ . command ( 'subtree' )
9+ . description ( 'Manage git subtrees for monorepo packages' ) ;
10+
11+ // Add subtree-related subcommands
12+ addCommand ( subtree ) ;
13+ pullCommand ( subtree ) ;
14+ rebuildCommand ( subtree ) ;
15+ }
Original file line number Diff line number Diff line change 11import { Command } from 'commander' ;
22import chalk from 'chalk' ;
3- import * as utils from '../utils' ;
3+ import * as utils from '../../ utils' ;
44
55export function pullCommand ( program : Command ) : void {
66 program
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import chalk from 'chalk';
33import fs from 'fs' ;
44import path from 'path' ;
55import inquirer from 'inquirer' ;
6- import * as utils from '../utils' ;
6+ import * as utils from '../../ utils' ;
77
88export function rebuildCommand ( program : Command ) : void {
99 program
Original file line number Diff line number Diff line change 11import { Command } from 'commander' ;
2- import { addCommand } from './commands/add' ;
3- import { pullCommand } from './commands/pull' ;
4- import { rebuildCommand } from './commands/rebuild' ;
5-
6-
2+ import { subtreeCommand } from './commands/subtree' ;
73
84// Create the program
95const program = new Command ( ) ;
106
117// Set up CLI metadata
128program
139 . name ( 'monoblok' )
14- . description ( 'CLI tool for managing subtrees in the monoblok monorepo' )
10+ . description ( 'CLI tool for managing the monoblok monorepo' )
1511 . version ( '0.1.0' ) ;
1612
1713// Register commands
18- addCommand ( program ) ;
19- pullCommand ( program ) ;
20- rebuildCommand ( program ) ;
14+ subtreeCommand ( program ) ;
2115
2216// Parse command line arguments
2317program . parse ( ) ;
You can’t perform that action at this time.
0 commit comments