@lsst/pik 0.4.2 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @lsst/pik
2
2
 
3
- CLI tool for switching config options in source files using `@pik` markers.
3
+ A developer toolkit with extensible plugins for common development tasks.
4
4
 
5
5
  ## Installation
6
6
 
@@ -8,9 +8,13 @@ CLI tool for switching config options in source files using `@pik` markers.
8
8
  npm install -g @lsst/pik
9
9
  ```
10
10
 
11
- ## Usage
11
+ ## Plugins
12
12
 
13
- ### 1. Add markers to your files
13
+ ### Select Plugin
14
+
15
+ Switch config options in source files using `@pik` markers.
16
+
17
+ #### 1. Add markers to your files
14
18
 
15
19
  ```typescript
16
20
  // @pik:select Environment
@@ -18,7 +22,7 @@ npm install -g @lsst/pik
18
22
  const env = 'LOCAL'; // @pik:option LOCAL
19
23
  ```
20
24
 
21
- ### 2. Create a config file
25
+ #### 2. Create a config file
22
26
 
23
27
  Create `pik.config.ts` in your project root:
24
28
 
@@ -26,31 +30,32 @@ Create `pik.config.ts` in your project root:
26
30
  import { defineConfig } from '@lsst/pik';
27
31
 
28
32
  export default defineConfig({
29
- include: ['src/**/*.ts', '.env'],
33
+ select: {
34
+ include: ['src/**/*.ts', '.env'],
35
+ },
30
36
  });
31
37
  ```
32
38
 
33
- ### 3. Run commands
39
+ #### 3. Run commands
34
40
 
35
41
  ```bash
36
- # List all selectors and their current state
37
- pik list
42
+ # Interactive mode
43
+ pik select
38
44
 
39
- # Set a specific option
40
- pik set Environment DEV
45
+ # List all selectors
46
+ pik select list
41
47
 
42
- # Interactive mode
43
- pik switch
48
+ # Set a specific option
49
+ pik select set Environment DEV
44
50
  ```
45
51
 
46
52
  ## Commands
47
53
 
48
54
  | Command | Alias | Description |
49
55
  |---------|-------|-------------|
50
- | `pik list` | `ls` | Show all selectors and their current state |
51
- | `pik set <selector> <option>` | - | Set an option directly |
52
- | `pik switch` | `sw` | Interactive selection mode |
53
- | `pik` | - | Same as `pik switch` |
56
+ | `pik select` | `sel` | Interactive selection mode |
57
+ | `pik select list` | `ls` | Show all selectors and their state |
58
+ | `pik select set <selector> <option>` | - | Set an option directly |
54
59
 
55
60
  ## Marker Syntax
56
61
 
@@ -1 +1 @@
1
- {"version":3,"file":"program.d.ts","sourceRoot":"","sources":["../../src/lib/program.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUpC,eAAO,MAAM,OAAO,SAGG,CAAC"}
1
+ {"version":3,"file":"program.d.ts","sourceRoot":"","sources":["../../src/lib/program.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWpC,eAAO,MAAM,OAAO,SAGG,CAAC"}
@@ -2,9 +2,10 @@ import { Command } from 'commander';
2
2
  import { select, Separator } from '@inquirer/prompts';
3
3
  import pc from 'picocolors';
4
4
  import { selectPlugin } from '@lsst/pik-plugin-select';
5
+ import { worktreePlugin } from '@lsst/pik-plugin-worktree';
5
6
  import pkg from '../../package.json' with { type: 'json' };
6
7
  // List of available plugins
7
- const plugins = [selectPlugin];
8
+ const plugins = [selectPlugin, worktreePlugin];
8
9
  export const program = new Command()
9
10
  .name(pkg.name)
10
11
  .description(pkg.description)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lsst/pik",
3
- "version": "0.4.2",
3
+ "version": "0.5.1",
4
4
  "description": "CLI tool for switching config options in source files",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -42,6 +42,7 @@
42
42
  "@inquirer/prompts": "^8.1.0",
43
43
  "@lsst/pik-core": "*",
44
44
  "@lsst/pik-plugin-select": "*",
45
+ "@lsst/pik-plugin-worktree": "*",
45
46
  "commander": "^14.0.2",
46
47
  "picocolors": "^1.1.1"
47
48
  }