@sujeetmainali/hello-world 1.0.0 → 2.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
@@ -1,9 +1,28 @@
1
- # my-npm-package
1
+ # @sujeetmainali/hello-world
2
2
 
3
- A simple greeting utility.
3
+ A simple **Hello World** npm package written in TypeScript.
4
+ This package provides a utility to print a greeting to the console.
4
5
 
5
- ## Install
6
+ ---
7
+
8
+ ## Installation
6
9
 
7
10
  ```bash
8
- npm install my-npm-package
11
+ # Using npm
12
+ npm install @sujeetmainali/hello-world
13
+
14
+ # Or using Yarn
15
+ yarn add @sujeetmainali/hello-world
16
+
17
+ ```
18
+
19
+ ## Example usage
20
+
21
+ ```bash
22
+ import { hello } from '@sujeetmainali/hello-world';
23
+
24
+ // Default greeting
25
+ hello(); // Output: Hello, world!
26
+
27
+ hello('Sujeet'); // Output: Hello, Sujeet!
9
28
  ```
@@ -0,0 +1,2 @@
1
+ export declare const hello: (name?: string) => void;
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,GAAI,OAAM,MAAgB,SAE3C,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+ export const hello = (name = "world") => {
2
+ console.log(`Hello, ${name}!`);
3
+ };
package/package.json CHANGED
@@ -1,11 +1,26 @@
1
1
  {
2
2
  "name": "@sujeetmainali/hello-world",
3
- "version": "1.0.0",
4
- "description": "this is the simple hello world package",
5
- "main": "index.js",
3
+ "version": "2.0.0",
4
+ "description": "This is a simple hello world package",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "files": [
9
+ "dist",
10
+ "README.md",
11
+ "LICENSE"
12
+ ],
6
13
  "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1"
14
+ "build": "tsc",
15
+ "prepublishOnly": "npm run build"
16
+ },
17
+ "publishConfig": {
18
+ "access": "public"
8
19
  },
9
20
  "author": "Sujeet Mainali",
10
- "license": "ISC"
21
+ "license": "ISC",
22
+ "devDependencies": {
23
+ "@types/node": "^25.0.9",
24
+ "typescript": "^5.9.3"
25
+ }
11
26
  }
package/index.js DELETED
@@ -1,5 +0,0 @@
1
- function hello(name = "world") {
2
- console.log(`Hello, ${name}!`);
3
- }
4
-
5
- module.exports = { hello };