@temir.ra/create-ts-lib 0.11.0-pre.9 → 0.11.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/CHANGELOG.md +3 -2
- package/README.md +24 -6
- package/buildinfo.txt +1 -1
- package/package.json +4 -4
- package/template/README.md +24 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Version 0
|
|
2
2
|
|
|
3
|
-
## 0.11.0
|
|
3
|
+
## 0.11.0
|
|
4
4
|
|
|
5
5
|
1. Synced template files with `workspace@0.7.0-pre.1` template.
|
|
6
6
|
2. Added more constants exports.
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
4. Included `tests/` in the published files.
|
|
9
9
|
5. Cleaned up minor `README.md` wording.
|
|
10
10
|
6. Updated `README.md` to reflect recent changes and clarify documentation.
|
|
11
|
-
7.
|
|
11
|
+
7. Refactored the Publish section in the `README.md` to include documentation scaffolding.
|
|
12
|
+
8. Updated from `template@0.4.0-pre.9` template.
|
|
12
13
|
|
|
13
14
|
## 0.10.1
|
|
14
15
|
|
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
|
-
|
|
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
|
-
|
|
37
|
+
npm create --no-install --no-git "@temir.ra/ts-lib@latest" .
|
|
25
38
|
|
|
26
39
|
# set metadata in package.json
|
|
27
40
|
|
|
28
|
-
|
|
41
|
+
npm install
|
|
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,14 @@ 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
|
+
|
|
434
453
|
```bash
|
|
435
454
|
# registry.npmjs.org/
|
|
436
455
|
npm login
|
|
437
|
-
|
|
438
|
-
npm publish --registry https://registry.npmjs.org/
|
|
456
|
+
npm publish
|
|
439
457
|
```
|
package/buildinfo.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.11.0
|
|
1
|
+
0.11.0+6625dc3
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@temir.ra/create-ts-lib",
|
|
3
|
-
"version": "0.11.0
|
|
3
|
+
"version": "0.11.0",
|
|
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": "
|
|
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": "
|
|
37
|
-
"clean: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",
|
package/template/README.md
CHANGED
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
# DevOps
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
|
-
npm update
|
|
25
24
|
npm install
|
|
25
|
+
npm update
|
|
26
26
|
|
|
27
27
|
npm run dev
|
|
28
28
|
|
|
@@ -43,7 +43,29 @@ npm run tests
|
|
|
43
43
|
|
|
44
44
|
## Publish
|
|
45
45
|
|
|
46
|
-
|
|
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/
|