@jiangdyjp2/common 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.
@@ -0,0 +1,7 @@
1
+ interface Color {
2
+ red: number;
3
+ blue: number;
4
+ }
5
+ declare const color: Color;
6
+ export default color;
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,UAAU,KAAK;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAA;CACf;AAED,QAAA,MAAM,KAAK,EAAE,KAGZ,CAAA;AAKD,eAAe,KAAK,CAAC"}
package/build/index.js ADDED
@@ -0,0 +1,8 @@
1
+ const color = {
2
+ red: 10,
3
+ blue: 100
4
+ };
5
+ console.log(color);
6
+ // change ["type": "Commonjs",] to ["type": "module",] in package.json
7
+ export default color;
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,MAAM,KAAK,GAAU;IACjB,GAAG,EAAE,EAAE;IACP,IAAI,EAAE,GAAG;CACZ,CAAA;AAED,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAEnB,sEAAsE;AACtE,eAAe,KAAK,CAAC"}
package/package.json CHANGED
@@ -1,16 +1,20 @@
1
1
  {
2
2
  "name": "@jiangdyjp2/common",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "",
5
- "main": "index.js",
5
+ "main": "./build/index.js",
6
+ "types": "./build/index.d.ts",
7
+ "files": [
8
+ "build/**/*"
9
+ ],
6
10
  "scripts": {
7
11
  "clean": "del ./build/*",
8
- "build": "tsc"
12
+ "build": "npm run clean && tsc"
9
13
  },
10
14
  "keywords": [],
11
15
  "author": "",
12
16
  "license": "ISC",
13
- "type": "commonjs",
17
+ "type": "module",
14
18
  "devDependencies": {
15
19
  "del-cli": "^7.0.0",
16
20
  "typescript": "^5.9.3"
package/readme.txt ADDED
@@ -0,0 +1,10 @@
1
+ (1) the following is related to npm common package:
2
+
3
+ "name": "@jiangdyjp2/common",
4
+ ...
5
+ "main": "./build/index.js",
6
+ "types": "./build/index.d.ts",
7
+ "files": ["build/**/*"],
8
+
9
+ (2) add ".gitignore" file
10
+
package/src/index.ts DELETED
@@ -1,11 +0,0 @@
1
- interface Color {
2
- red: number,
3
- blue: number
4
- }
5
-
6
- const color: Color = {
7
- red: 10,
8
- blue: 100
9
- }
10
-
11
- console.log(color);
package/tsconfig.json DELETED
@@ -1,44 +0,0 @@
1
- {
2
- // Visit https://aka.ms/tsconfig to read more about this file
3
- "compilerOptions": {
4
- // File Layout
5
- // "rootDir": "./src",
6
- "outDir": "./build",
7
-
8
- // Environment Settings
9
- // See also https://aka.ms/tsconfig/module
10
- "module": "nodenext",
11
- "target": "esnext",
12
- "types": [],
13
- // For nodejs:
14
- // "lib": ["esnext"],
15
- // "types": ["node"],
16
- // and npm install -D @types/node
17
-
18
- // Other Outputs
19
- "sourceMap": true,
20
- "declaration": true,
21
- "declarationMap": true,
22
-
23
- // Stricter Typechecking Options
24
- "noUncheckedIndexedAccess": true,
25
- "exactOptionalPropertyTypes": true,
26
-
27
- // Style Options
28
- // "noImplicitReturns": true,
29
- // "noImplicitOverride": true,
30
- // "noUnusedLocals": true,
31
- // "noUnusedParameters": true,
32
- // "noFallthroughCasesInSwitch": true,
33
- // "noPropertyAccessFromIndexSignature": true,
34
-
35
- // Recommended Options
36
- "strict": true,
37
- "jsx": "react-jsx",
38
- "verbatimModuleSyntax": true,
39
- "isolatedModules": true,
40
- "noUncheckedSideEffectImports": true,
41
- "moduleDetection": "force",
42
- "skipLibCheck": true,
43
- }
44
- }