@mend-eicar/hello-world 1.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.
Files changed (3) hide show
  1. package/README.md +25 -0
  2. package/index.js +5 -0
  3. 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
@@ -0,0 +1,5 @@
1
+ function helloWorld() {
2
+ return "Hello world";
3
+ }
4
+
5
+ module.exports = { helloWorld };
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
+ }