@heiwa4126/hello5 0.0.3 → 0.0.5-beta.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 +20 -0
- package/dist/cli.js +6 -0
- package/dist/hello.cjs +0 -1
- package/dist/hello.global.js +1 -0
- package/dist/hello.js +0 -1
- package/package.json +7 -5
- package/dist/main.cjs +0 -5
- package/dist/main.d.ts +0 -1
- package/dist/main.js +0 -4
package/README.md
CHANGED
|
@@ -49,6 +49,26 @@ import { hello } from "@heiwa4126/hello5";
|
|
|
49
49
|
console.log(hello()); // "Hello!"
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
+
#### Browser ESM Module Example (CDN)
|
|
53
|
+
|
|
54
|
+
ESM.sh:
|
|
55
|
+
|
|
56
|
+
```html
|
|
57
|
+
<!DOCTYPE html>
|
|
58
|
+
<div id="app">loading...</div>
|
|
59
|
+
|
|
60
|
+
<script type="module">
|
|
61
|
+
import { hello } from "https://esm.sh/@heiwa4126/hello5";
|
|
62
|
+
|
|
63
|
+
document.getElementById("app").innerText = hello();
|
|
64
|
+
</script>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Other CDNs:
|
|
68
|
+
|
|
69
|
+
- jsDelivr [@heiwa4126/hello5 CDN by jsDelivr - A CDN for npm and GitHub](https://www.jsdelivr.com/package/npm/@heiwa4126/hello5)
|
|
70
|
+
- unpkg [UNPKG](https://app.unpkg.com/@heiwa4126/hello5)
|
|
71
|
+
|
|
52
72
|
### As a CLI tool
|
|
53
73
|
|
|
54
74
|
After installation, you can use the CLI command:
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import o from"../package.json"with{type:"json"};import{hello as i}from"./hello.js";function n(){console.log(`Usage: heiwa4126-hello5 [-h|--help] [-V|--version]
|
|
3
|
+
|
|
4
|
+
Options:
|
|
5
|
+
-h, --help Show this help message
|
|
6
|
+
-V, --version Show version`)}function s(){console.log(String(o.version))}function l(){const e=process.argv.slice(2);(e.includes("-h")||e.includes("--help"))&&(n(),process.exit(0)),(e.includes("-V")||e.includes("--version"))&&(s(),process.exit(0)),console.log(i())}l();
|
package/dist/hello.cjs
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var Heiwa4126Hello5=(()=>{var r=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var f=(l,e)=>{for(var o in e)r(l,o,{get:e[o],enumerable:!0})},g=(l,e,o,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of u(e))!c.call(l,n)&&n!==o&&r(l,n,{get:()=>e[n],enumerable:!(t=i(e,n))||t.enumerable});return l};var h=l=>g(r({},"__esModule",{value:!0}),l);var s={};f(s,{hello:()=>p});function p(){return"Hello!"}return h(s);})();
|
package/dist/hello.js
CHANGED
package/package.json
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@heiwa4126/hello5",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5-beta.1",
|
|
4
4
|
"description": "TypeScript hello world library with dual ES modules/CommonJS support. Features GitHub Actions trusted publishing to npmjs with Sigstore attestation.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/hello.cjs",
|
|
7
|
+
"module": "./dist/hello.js",
|
|
8
|
+
"browser": "./dist/hello.global.js",
|
|
7
9
|
"types": "./dist/hello.d.ts",
|
|
8
10
|
"exports": {
|
|
9
11
|
".": {
|
|
@@ -13,7 +15,7 @@
|
|
|
13
15
|
}
|
|
14
16
|
},
|
|
15
17
|
"bin": {
|
|
16
|
-
"heiwa4126-hello5": "./dist/
|
|
18
|
+
"heiwa4126-hello5": "./dist/cli.js"
|
|
17
19
|
},
|
|
18
20
|
"files": [
|
|
19
21
|
"dist/**/*.js",
|
|
@@ -45,13 +47,13 @@
|
|
|
45
47
|
"homepage": "https://github.com/heiwa4126/heiwa4126-hello5#readme",
|
|
46
48
|
"license": "MIT",
|
|
47
49
|
"devDependencies": {
|
|
48
|
-
"@biomejs/biome": "^2.3.
|
|
50
|
+
"@biomejs/biome": "^2.3.8",
|
|
49
51
|
"@heiwa4126/clean-publish-scripts": "^0.0.1",
|
|
50
52
|
"@types/node": "^24.10.1",
|
|
51
53
|
"tsup": "^8.5.1",
|
|
52
|
-
"tsx": "^4.
|
|
54
|
+
"tsx": "^4.21.0",
|
|
53
55
|
"typescript": "^5.9.3",
|
|
54
|
-
"vitest": "^4.0.
|
|
56
|
+
"vitest": "^4.0.15"
|
|
55
57
|
},
|
|
56
58
|
"engines": {
|
|
57
59
|
"node": ">=18.0.0"
|
package/dist/main.cjs
DELETED
package/dist/main.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
package/dist/main.js
DELETED