@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 CHANGED
@@ -11,12 +11,14 @@
11
11
 
12
12
  ## Setup
13
13
 
14
- - `cd discography`
15
- - `npm i`
16
- - `cd src`
17
- - `python3 -m venv venv`
18
- - `source venv/bin/activate`
19
- - `pip install -r requirements.txt`
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
- ## Updating & Publishing
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
- ### One Shot
46
+ ## Test
37
47
 
38
48
  ```zsh
39
- cd src && python3 -m venv venv && source venv/bin/activate && pip install -r requirements.txt && cd ../ && npm run build && git add . && git commit -m "++" && git push origin main && npm version patch && npm publish
49
+ source src/venv/bin/activate
50
+ pytest tests/
40
51
  ```
41
52
 
42
- ### Sequential
53
+ ## Lint
54
+
55
+ ```zsh
56
+ npm run lint
57
+ ```
43
58
 
44
- - Update `./src/discography.yml`
45
- - `npm run build` (convert yml to ts & build dist ready js)
46
- - `git add . && git commit -m "++" && git push origin main`
47
- - QA: [https://github.com/tyleretters/discography](https://github.com/tyleretters/discography)
48
- - `npm version patch`
49
- - `npm publish`
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
- - `npm i @tyleretters/discography`
54
- - `import discography from '@tyleretters/discography'`
72
+ ```zsh
73
+ npm i @tyleretters/discography
74
+ ```
75
+
76
+ ```typescript
77
+ import discography from '@tyleretters/discography'
78
+ ```