@tyleretters/discography 2.2.0 → 3.0.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 +42 -18
- package/dist/index.es.js +787 -787
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/dist/types.d.ts +6 -3
- package/package.json +7 -2
package/README.md
CHANGED
|
@@ -11,12 +11,14 @@
|
|
|
11
11
|
|
|
12
12
|
## Setup
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
-
|
|
19
|
-
|
|
14
|
+
```zsh
|
|
15
|
+
cd discography
|
|
16
|
+
npm i
|
|
17
|
+
cd src
|
|
18
|
+
python3 -m venv venv
|
|
19
|
+
source venv/bin/activate
|
|
20
|
+
pip install -r requirements.txt
|
|
21
|
+
```
|
|
20
22
|
|
|
21
23
|
## Adding a Compilation
|
|
22
24
|
|
|
@@ -31,24 +33,46 @@ python3 scrape_bandcamp.py <bandcamp_url> \
|
|
|
31
33
|
|
|
32
34
|
Review the prepended entry in `src/discography.yml`, then build and publish as normal.
|
|
33
35
|
|
|
34
|
-
##
|
|
36
|
+
## Build
|
|
37
|
+
|
|
38
|
+
```zsh
|
|
39
|
+
npm run build
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
This runs the full pipeline: Python converter (YAML to TS), Vite bundler (ESM + UMD), TypeScript compiler (type declarations), and copies the source YAML to `dist/`.
|
|
43
|
+
|
|
44
|
+
`dist/` is gitignored — built artifacts are not committed. The `"files"` field in `package.json` ensures `dist/` is always included in the npm tarball.
|
|
35
45
|
|
|
36
|
-
|
|
46
|
+
## Test
|
|
37
47
|
|
|
38
48
|
```zsh
|
|
39
|
-
|
|
49
|
+
source src/venv/bin/activate
|
|
50
|
+
pytest tests/
|
|
40
51
|
```
|
|
41
52
|
|
|
42
|
-
|
|
53
|
+
## Lint
|
|
54
|
+
|
|
55
|
+
```zsh
|
|
56
|
+
npm run lint
|
|
57
|
+
```
|
|
43
58
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
-
|
|
59
|
+
## Publishing
|
|
60
|
+
|
|
61
|
+
After updating `src/discography.yml`:
|
|
62
|
+
|
|
63
|
+
```zsh
|
|
64
|
+
git add . && git commit -m "++" && git push origin main
|
|
65
|
+
npm version patch && npm publish
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
`npm publish` automatically runs `npm run build` via the `prepublishOnly` hook, so there's no need to build manually before publishing.
|
|
50
69
|
|
|
51
70
|
## Downstream Implementations
|
|
52
71
|
|
|
53
|
-
|
|
54
|
-
|
|
72
|
+
```zsh
|
|
73
|
+
npm i @tyleretters/discography
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
```typescript
|
|
77
|
+
import discography from '@tyleretters/discography'
|
|
78
|
+
```
|