@mend-eicar/hello-world 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +25 -0
- package/index.js +5 -0
- package/package.json +11 -0
package/README.md
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# Hello World
|
2
|
+
|
3
|
+
A package that returns the `Hello world` string once you install it.
|
4
|
+
|
5
|
+
## Local development
|
6
|
+
|
7
|
+
### Building the package
|
8
|
+
|
9
|
+
Navigate to this directory and run `npm link`.
|
10
|
+
|
11
|
+
### Adding the package to your test application
|
12
|
+
|
13
|
+
1. Create an empty `index.js` file in any location you wish, outside this directory.
|
14
|
+
2. Run `npm link hello-world` from within that location.
|
15
|
+
3. Edit the `index.js` file and place the following content inside:
|
16
|
+
|
17
|
+
```js
|
18
|
+
const { helloWorld } = require("hello-world");
|
19
|
+
console.log(helloWorld());
|
20
|
+
```
|
21
|
+
|
22
|
+
4. Save the `index.js` file.
|
23
|
+
5. Run `node index.js`.
|
24
|
+
6. You should see `Hello world` displayed in the console.
|
25
|
+
|
package/index.js
ADDED
package/package.json
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
{
|
2
|
+
"name": "@mend-eicar/hello-world",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"description": "A simple test package that returns the `Hello world` string once you install it.",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
8
|
+
},
|
9
|
+
"author": "Mend.io",
|
10
|
+
"license": "ISC"
|
11
|
+
}
|