@temir.ra/create-ts-lib 0.11.0-pre.9 → 0.11.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/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
  # Version 0
2
2
 
3
- ## 0.11.0-pre.6
3
+ ## 0.11.1
4
+
5
+ 1. Updated from `template@0.4.1` template.
6
+
7
+ ## 0.11.0
4
8
 
5
9
  1. Synced template files with `workspace@0.7.0-pre.1` template.
6
10
  2. Added more constants exports.
@@ -8,7 +12,8 @@
8
12
  4. Included `tests/` in the published files.
9
13
  5. Cleaned up minor `README.md` wording.
10
14
  6. Updated `README.md` to reflect recent changes and clarify documentation.
11
- 7. Simplified the Publish section in the generated README, as the registry configuration steps are now covered in the `workspace` template README.
15
+ 7. Refactored the Publish section in the `README.md` to include documentation scaffolding.
16
+ 8. Updated from `template@0.4.0-pre.9` template.
12
17
 
13
18
  ## 0.10.1
14
19
 
package/README.md CHANGED
@@ -6,6 +6,19 @@ A template for TypeScript libraries distributed via npm-compatible registries. P
6
6
 
7
7
  1. [Quick Start](#quick-start)
8
8
  2. [Documentation](#documentation)
9
+ 1. [`package.json`](#packagejson)
10
+ 2. [Script `scripts/build-bundle.ts`](#script-scriptsbuild-bundlets)
11
+ 1. [CDN Map `scripts/cdn-rewrite-map.json`](#cdn-map-scriptscdn-rewrite-mapjson)
12
+ 3. [`tsconfig.build.json`](#tsconfigbuildjson)
13
+ 4. [Asset Resolution](#asset-resolution)
14
+ 1. [Externalized - loaded from CDN or `node_modules/`](#externalized---loaded-from-cdn-or-node_modules)
15
+ 2. [Bundled - absorbed into the consumer's output](#bundled---absorbed-into-the-consumers-output)
16
+ 3. [Contract](#contract)
17
+ 1. [Scoped assets directory convention](#scoped-assets-directory-convention)
18
+ 2. [Accessing assets](#accessing-assets)
19
+ 3. [README statement for library consumers](#readme-statement-for-library-consumers)
20
+ 4. [When the library is bundled by the consumer](#when-the-library-is-bundled-by-the-consumer)
21
+ 5. [`"bin"` field in `package.json`](#bin-field-in-packagejson)
9
22
  3. [DevOps](#devops)
10
23
  1. [Change Management](#change-management)
11
24
  2. [Publish](#publish)
@@ -18,14 +31,14 @@ A template for TypeScript libraries distributed via npm-compatible registries. P
18
31
  # <TEMPLATE_NAME: @temir.ra/ts-lib
19
32
 
20
33
  # print the latest version
21
- bun info "@temir.ra/create-ts-lib" version
34
+ npm info "@temir.ra/create-ts-lib" version
22
35
 
23
36
  # create/update a package from the template in the current directory
24
- bun create --no-install --no-git "@temir.ra/ts-lib@latest" .
37
+ npm create --no-install --no-git "@temir.ra/ts-lib@latest" .
25
38
 
26
39
  # set metadata in package.json
27
40
 
28
- bun install
41
+ npm update
29
42
  ```
30
43
 
31
44
  # Documentation
@@ -409,8 +422,8 @@ If the package exports a CLI only and is not intended to be imported in other pa
409
422
  # DevOps
410
423
 
411
424
  ```bash
412
- npm update
413
425
  npm install
426
+ npm update
414
427
 
415
428
  npm run clean
416
429
  npm run build
@@ -431,9 +444,21 @@ npmx tsx dist/cli.bundle.js -- example/
431
444
 
432
445
  ## Publish
433
446
 
447
+ `~/.npmrc` or `.npmrc`:
448
+
449
+ ```ini
450
+ @temir.ra:registry=https://registry.npmjs.org/
451
+ ```
452
+
453
+ `~/.bunfig.toml` or `bunfig.toml`:
454
+
455
+ ```toml
456
+ [install.scopes]
457
+ "temir.ra" = { url = "https://registry.npmjs.org/" }
458
+ ```
459
+
434
460
  ```bash
435
461
  # registry.npmjs.org/
436
462
  npm login
437
-
438
- npm publish --registry https://registry.npmjs.org/
463
+ npm publish
439
464
  ```
package/buildinfo.txt CHANGED
@@ -1 +1 @@
1
- 0.11.0-pre.9+c4e82f7
1
+ 0.11.1+18c476f
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@temir.ra/create-ts-lib",
3
- "version": "0.11.0-pre.9",
3
+ "version": "0.11.1",
4
4
  "description": "A template for a distributable TypeScript library package.",
5
5
  "private": false,
6
6
  "keywords": [
@@ -30,11 +30,11 @@
30
30
  "#src/*.js": "./src/*.ts"
31
31
  },
32
32
  "scripts": {
33
- "reinstall": "shx rm -rf node_modules && shx rm -f package-lock.json bun.lock yarn.lock pnpm-lock.yaml && npm install",
33
+ "reinstall": "rm -rf node_modules && rm -f package-lock.json bun.lock yarn.lock pnpm-lock.yaml && npm install",
34
34
  "typecheck": "tsc --noEmit",
35
35
  "buildinfo": "tsx scripts/buildinfo.ts",
36
- "clean:dist": "shx rm -rf dist/",
37
- "clean:tsbuildinfo": "shx rm -f tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo",
36
+ "clean:dist": "rm -rf dist/",
37
+ "clean:tsbuildinfo": "rm -f tsconfig.tsbuildinfo tsconfig.build.tsbuildinfo",
38
38
  "clean": "npm run clean:dist && npm run clean:tsbuildinfo",
39
39
  "tests": "node --import tsx --test tests/**/*.test.ts",
40
40
  "prebuild": "npm run buildinfo",
@@ -21,14 +21,14 @@
21
21
  # DevOps
22
22
 
23
23
  ```bash
24
- npm update
25
24
  npm install
26
-
27
- npm run dev
25
+ npm update
28
26
 
29
27
  npm run clean
30
28
  npm run build
31
29
  npm run tests
30
+
31
+ npm run dev
32
32
  ```
33
33
 
34
34
  ## Change Management
@@ -43,7 +43,29 @@ npm run tests
43
43
 
44
44
  ## Publish
45
45
 
46
- Configure the scope registry as described in the [`workspace` template README](https://git.chimps.quest/trs/create-workspace#scope-registry).
46
+ ```bash
47
+ # placeholder:
48
+ # <SCOPE_WITHOUT_AT: <SCOPE_WITHOUT_AT>
49
+ # <REGISTRY_ORIGIN_AND_PATH: <REGISTRY_ORIGIN_AND_PATH>
50
+ # e.g.
51
+ # registry.npmjs.org/
52
+ # forgejo.example.com/api/packages/<SCOPE_WITHOUT_AT>/npm/
53
+ # <REGISTRY_AUTH_TOKEN_ENV_VAR: <REGISTRY_AUTH_TOKEN_ENV_VAR>
54
+ ```
55
+
56
+ `~/.npmrc` or `.npmrc`:
57
+
58
+ ```ini
59
+ @<SCOPE_WITHOUT_AT>:registry=https://<REGISTRY_ORIGIN_AND_PATH>
60
+ //<REGISTRY_ORIGIN_AND_PATH>:_authToken=${<REGISTRY_AUTH_TOKEN_ENV_VAR>}
61
+ ```
62
+
63
+ `~/.bunfig.toml` or `bunfig.toml`:
64
+
65
+ ```toml
66
+ [install.scopes]
67
+ "<SCOPE_WITHOUT_AT>" = { url = "https://<REGISTRY_ORIGIN_AND_PATH>", token = "$<REGISTRY_AUTH_TOKEN_ENV_VAR>" }
68
+ ```
47
69
 
48
70
  ```bash
49
71
  # registry.npmjs.org/