design-parity 0.1.0
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 +24 -0
- package/bin/design-parity.mjs +7 -0
- package/index.d.ts +1 -0
- package/index.js +4 -0
- package/package.json +30 -0
package/README.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# design-parity
|
|
2
|
+
|
|
3
|
+
The top-level CLI for [design-parity](https://github.com/yschimke/design-parity)
|
|
4
|
+
— prove a UI pull request is at parity with its intended design. Run it with no
|
|
5
|
+
checkout:
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npx design-parity run \
|
|
9
|
+
--components "ui/Home.kt#HomeScreen" \
|
|
10
|
+
--candidate-bundles build/compose-previews/ \
|
|
11
|
+
--out .design-parity/out
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
This package is a thin launcher over
|
|
15
|
+
[`@design-parity/action`](https://www.npmjs.com/package/@design-parity/action):
|
|
16
|
+
it owns the `design-parity` bin so the bare `npx design-parity` invocation
|
|
17
|
+
works, and it re-exports the orchestrator's programmatic API
|
|
18
|
+
(`import { orchestrate } from "design-parity"`). The candidate side is rendered
|
|
19
|
+
by the upstream [`compose-preview`](https://github.com/yschimke/compose-ai-tools)
|
|
20
|
+
CLI — design-parity owns the reference side and the diff.
|
|
21
|
+
|
|
22
|
+
See the [repo README](https://github.com/yschimke/design-parity#readme) and the
|
|
23
|
+
[CMP adoption guide](https://github.com/yschimke/design-parity/blob/main/docs/adopting-cmp.md)
|
|
24
|
+
for the full pipeline.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// `npx design-parity run …` — the no-checkout entrypoint. A thin launcher: it
|
|
3
|
+
// loads @design-parity/action's run CLI, which reads process.argv itself and
|
|
4
|
+
// sets the exit code. All the logic lives in the orchestrator package; this
|
|
5
|
+
// package exists only to own the `design-parity` name on the registry so the
|
|
6
|
+
// bare `npx design-parity` invocation works.
|
|
7
|
+
import "@design-parity/action/run";
|
package/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@design-parity/action";
|
package/index.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// The top-level `design-parity` package re-exports the programmatic API of
|
|
2
|
+
// @design-parity/action, so `import { orchestrate } from "design-parity"` works
|
|
3
|
+
// the same as importing from the scoped package. The CLI entrypoint is bin/.
|
|
4
|
+
export * from "@design-parity/action";
|
package/package.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "design-parity",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Top-level CLI for design-parity: run a parity check with no checkout via `npx design-parity run …`. A thin launcher over @design-parity/action; re-exports its programmatic API too.",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./index.js",
|
|
8
|
+
"types": "./index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": "./index.js"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"bin",
|
|
14
|
+
"index.js",
|
|
15
|
+
"index.d.ts"
|
|
16
|
+
],
|
|
17
|
+
"bin": {
|
|
18
|
+
"design-parity": "./bin/design-parity.mjs"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@design-parity/action": "^0.1.0"
|
|
22
|
+
},
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "git+https://github.com/yschimke/design-parity.git",
|
|
26
|
+
"directory": "packages/cli"
|
|
27
|
+
},
|
|
28
|
+
"homepage": "https://github.com/yschimke/design-parity/tree/main/packages/cli#readme",
|
|
29
|
+
"bugs": "https://github.com/yschimke/design-parity/issues"
|
|
30
|
+
}
|