@justnixxuu/hello-npm 1.0.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 +39 -0
- package/index.js +23 -0
- package/package.json +20 -0
- package/pyproject.toml +23 -0
- package/setup.py +23 -0
package/README.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Hello npm Package
|
|
2
|
+
|
|
3
|
+
A simple example npm package for testing.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @yourusername/hello-npm
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```javascript
|
|
14
|
+
const { greet, add } = require('@yourusername/hello-npm');
|
|
15
|
+
|
|
16
|
+
console.log(greet('Developer')); // Hello, Developer!
|
|
17
|
+
console.log(add(2, 3)); // 5
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## API
|
|
21
|
+
|
|
22
|
+
### `greet(name)`
|
|
23
|
+
|
|
24
|
+
Returns a greeting message.
|
|
25
|
+
|
|
26
|
+
- `name` (string): The name to greet. Defaults to 'World'.
|
|
27
|
+
|
|
28
|
+
### `add(a, b)`
|
|
29
|
+
|
|
30
|
+
Adds two numbers together.
|
|
31
|
+
|
|
32
|
+
- `a` (number): First number
|
|
33
|
+
- `b` (number): Second number
|
|
34
|
+
|
|
35
|
+
Returns the sum as a number.
|
|
36
|
+
|
|
37
|
+
## License
|
|
38
|
+
|
|
39
|
+
MIT
|
package/index.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A simple greeting function
|
|
3
|
+
* @param {string} name - The name to greet
|
|
4
|
+
* @returns {string} A greeting message
|
|
5
|
+
*/
|
|
6
|
+
function greet(name = 'World') {
|
|
7
|
+
return `Hello, ${name}!`;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Adds two numbers together
|
|
12
|
+
* @param {number} a - First number
|
|
13
|
+
* @param {number} b - Second number
|
|
14
|
+
* @returns {number} The sum of a and b
|
|
15
|
+
*/
|
|
16
|
+
function add(a, b) {
|
|
17
|
+
return a + b;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
module.exports = {
|
|
21
|
+
greet,
|
|
22
|
+
add
|
|
23
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@justnixxuu/hello-npm",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "A simple example npm package",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
+
},
|
|
9
|
+
"keywords": [
|
|
10
|
+
"example",
|
|
11
|
+
"hello",
|
|
12
|
+
"npm"
|
|
13
|
+
],
|
|
14
|
+
"author": "Your Name",
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "https://github.com/justnixxuu/hello-npm.git"
|
|
19
|
+
}
|
|
20
|
+
}
|
package/pyproject.toml
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = [ "setuptools>=61.0", "wheel",]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "Asa"
|
|
7
|
+
version = "1.0.0"
|
|
8
|
+
description = ""
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.8"
|
|
11
|
+
classifiers = [ "Programming Language :: Python :: 3", "License :: OSI Approved :: MIT License",]
|
|
12
|
+
dependencies = []
|
|
13
|
+
[[project.authors]]
|
|
14
|
+
name = ""
|
|
15
|
+
email = ""
|
|
16
|
+
|
|
17
|
+
[project.license]
|
|
18
|
+
text = "MIT"
|
|
19
|
+
|
|
20
|
+
[project.urls]
|
|
21
|
+
Homepage = ""
|
|
22
|
+
Repository = "https://github.com/yourusername/your-repo"
|
|
23
|
+
Issues = "https://github.com/yourusername/your-repo/issues"
|
package/setup.py
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
from setuptools import setup, find_packages
|
|
2
|
+
|
|
3
|
+
with open("README.md", "r", encoding="utf-8") as fh:
|
|
4
|
+
long_description = fh.read()
|
|
5
|
+
|
|
6
|
+
setup(
|
|
7
|
+
name="Asa",
|
|
8
|
+
version="1.0.0",
|
|
9
|
+
author="",
|
|
10
|
+
author_email="",
|
|
11
|
+
description="",
|
|
12
|
+
long_description=long_description,
|
|
13
|
+
long_description_content_type="text/markdown",
|
|
14
|
+
url="",
|
|
15
|
+
packages=find_packages(),
|
|
16
|
+
classifiers=[
|
|
17
|
+
"Programming Language :: Python :: 3",
|
|
18
|
+
"License :: OSI Approved :: MIT License",
|
|
19
|
+
"Operating System :: OS Independent",
|
|
20
|
+
],
|
|
21
|
+
python_requires=">=3.8",
|
|
22
|
+
install_requires=[],
|
|
23
|
+
)
|