@jsonresume/sample-data 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.
- package/README.md +69 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# @jsonresume/sample-data
|
|
2
|
+
|
|
3
|
+
Sample [JSON Resume](https://jsonresume.org) fixtures for tests, demos, and theme development.
|
|
4
|
+
|
|
5
|
+
Ships a complete every-section resume plus a minimal subset, so you can render or validate against realistic data without hand-rolling a fixture.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install --save-dev @jsonresume/sample-data
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## API
|
|
14
|
+
|
|
15
|
+
Named exports from the root (`.`):
|
|
16
|
+
|
|
17
|
+
| Export | Description |
|
|
18
|
+
| --- | --- |
|
|
19
|
+
| `completeResume` | An every-section resume (`basics` + all 12 standard sections). The canonical fixture used by the registry theme-render QA gate. |
|
|
20
|
+
| `minimalResume` | A small `basics` + first `work` / `education` / `skills` subset, derived from `completeResume` so it never drifts from the canonical shape. |
|
|
21
|
+
| `resumeSample` | A second, fuller sample resume kept alongside the complete fixture. |
|
|
22
|
+
|
|
23
|
+
A default export bundles all three: `{ completeResume, minimalResume, resumeSample }`.
|
|
24
|
+
|
|
25
|
+
The raw JSON is also reachable directly:
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
import complete from '@jsonresume/sample-data/complete-resume.json';
|
|
29
|
+
import sample from '@jsonresume/sample-data/resume-sample.json';
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Usage
|
|
33
|
+
|
|
34
|
+
Render a theme against the complete fixture in a test:
|
|
35
|
+
|
|
36
|
+
```js
|
|
37
|
+
import { completeResume } from '@jsonresume/sample-data';
|
|
38
|
+
import { render } from 'jsonresume-theme-flat';
|
|
39
|
+
|
|
40
|
+
test('theme renders every section', () => {
|
|
41
|
+
const html = render(completeResume);
|
|
42
|
+
expect(html).toContain(completeResume.basics.name);
|
|
43
|
+
});
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Use the minimal fixture for fast, focused tests:
|
|
47
|
+
|
|
48
|
+
```js
|
|
49
|
+
import { minimalResume } from '@jsonresume/sample-data';
|
|
50
|
+
|
|
51
|
+
expect(minimalResume.work).toHaveLength(1);
|
|
52
|
+
expect(minimalResume.basics).toBeDefined();
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Import the default export when you want everything at once:
|
|
56
|
+
|
|
57
|
+
```js
|
|
58
|
+
import samples from '@jsonresume/sample-data';
|
|
59
|
+
|
|
60
|
+
const { completeResume, minimalResume, resumeSample } = samples;
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Ecosystem
|
|
64
|
+
|
|
65
|
+
Part of the [JSON Resume](https://jsonresume.org) ecosystem. See the roadmap and related packages in [jsonresume/jsonresume.org#421](https://github.com/jsonresume/jsonresume.org/issues/421).
|
|
66
|
+
|
|
67
|
+
## License
|
|
68
|
+
|
|
69
|
+
MIT
|