@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 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
@@ -28,4 +28,3 @@ function hello() {
28
28
  0 && (module.exports = {
29
29
  hello
30
30
  });
31
- //# sourceMappingURL=hello.cjs.map
@@ -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
@@ -4,4 +4,3 @@ function hello() {
4
4
  export {
5
5
  hello
6
6
  };
7
- //# sourceMappingURL=hello.js.map
package/package.json CHANGED
@@ -1,9 +1,11 @@
1
1
  {
2
2
  "name": "@heiwa4126/hello5",
3
- "version": "0.0.3",
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/main.js"
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.7",
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.20.6",
54
+ "tsx": "^4.21.0",
53
55
  "typescript": "^5.9.3",
54
- "vitest": "^4.0.14"
56
+ "vitest": "^4.0.15"
55
57
  },
56
58
  "engines": {
57
59
  "node": ">=18.0.0"
package/dist/main.cjs DELETED
@@ -1,5 +0,0 @@
1
- #!/usr/bin/env node
2
- "use strict";
3
- var import_hello = require("./hello.js");
4
- console.log((0, import_hello.hello)());
5
- //# sourceMappingURL=main.cjs.map
package/dist/main.d.ts DELETED
@@ -1 +0,0 @@
1
- #!/usr/bin/env node
package/dist/main.js DELETED
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env node
2
- import { hello } from "./hello.js";
3
- console.log(hello());
4
- //# sourceMappingURL=main.js.map