spec-layer 0.2.0 → 0.2.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.
Files changed (3) hide show
  1. package/README.md +25 -0
  2. package/dist/cli.js +2 -0
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -24,6 +24,31 @@ library id, record it once:
24
24
  npx spec-layer init --id lib_...
25
25
  ```
26
26
 
27
+ ## Installing, or not
28
+
29
+ `npx` needs no install step: it fetches the package and runs it. That is the
30
+ right choice for trying this once, and for a repo that pulls by hand.
31
+
32
+ Two cases want a real install instead. On a cold cache `npx` has to fetch the
33
+ package first, and confirming that is a prompt you do not want in an
34
+ unattended run. `--yes` answers it up front:
35
+
36
+ ```bash
37
+ npx --yes spec-layer status
38
+ ```
39
+
40
+ And a repo that pulls on a schedule should pin the version rather than
41
+ resolving the latest release on every run, so a CLI update never changes a
42
+ build you did not touch:
43
+
44
+ ```bash
45
+ npm install --save-dev spec-layer
46
+ ```
47
+
48
+ `npx spec-layer` then runs the pinned local copy, no `--yes` needed. Pinning
49
+ also keeps `.speclayer/manifest.json` on one format: 0.1.0 wrote no
50
+ `selection` field, and 0.2.0 does.
51
+
27
52
  ## Commands
28
53
 
29
54
  | Command | What it does |
package/dist/cli.js CHANGED
@@ -1,4 +1,6 @@
1
1
  #!/usr/bin/env node
2
+ import { createRequire } from 'node:module';
3
+ const require = createRequire(import.meta.url);
2
4
  var __create = Object.create;
3
5
  var __defProp = Object.defineProperty;
4
6
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spec-layer",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Pull design-system context published by the Spec Layer Figma plugin",
5
5
  "license": "MIT",
6
6
  "type": "module",