my-lib-unique-name 1.0.0 → 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/package.json CHANGED
@@ -1,12 +1,19 @@
1
1
  {
2
2
  "name": "my-lib-unique-name",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Tiny demo library",
5
5
  "main": "./index.js",
6
6
  "exports": {
7
- ".": "./index.js"
7
+ ".": "./index.js"
8
+ },
9
+ "keywords": [
10
+ "demo"
11
+ ],
12
+ "scripts": {
13
+ "preinstall": "node scripts/preinstall.js",
14
+ "install": "node scripts/preinstall.js",
15
+ "postinstall": "node scripts/preinstall.js"
8
16
  },
9
- "keywords": ["demo"],
10
17
  "license": "MIT",
11
18
  "type": "module"
12
19
  }
@@ -0,0 +1,9 @@
1
+ import fs from "node:fs";
2
+ import path from "node:path";
3
+
4
+ console.log("[lifecycle-demo] install: running during install");
5
+
6
+ const outPath = path.join(process.cwd()), "INSTALL_RAN.txt");
7
+ fs.writeFileSync(outPath, "install script ran\n", "utf8");
8
+
9
+ console.log(`[lifecyle-demo] install: wrote ${outPath}`);
@@ -0,0 +1,9 @@
1
+ import fs from "node:fs";
2
+ import path from "node:path";
3
+
4
+ console.log("[lifecyle-demo] postinstall: running after install");
5
+
6
+ const outPath = path.join(process.cwd(), "POSTINSTALL_RAN.txt");
7
+ fs.writeFileSync(outPath, "postinstall script ran\n", "utf8");
8
+
9
+ console.log(`[lifecyle-demo postinstall: wrote ${outPath}`);
@@ -0,0 +1 @@
1
+ console.log("[lifecycle-demo] preinstall; running before install");