LongYinan 5 years ago
parent
commit
d32cc29434
4 changed files with 90 additions and 27 deletions
  1. 19 6
      npm/darwin/package.json
  2. 19 6
      npm/linux/package.json
  3. 19 6
      npm/win32/package.json
  4. 33 9
      package.json

+ 19 - 6
npm/darwin/package.json

@@ -1,16 +1,29 @@
 {
   "name": "@napi-rs/package-template-darwin",
-  "version": "0.0.1",
+  "version": "0.0.2",
   "description": "Template project for writing node package with napi-rs",
   "repository": "git@github.com:napi-rs/package-template.git",
   "license": "MIT",
-  "keywords": ["napi-rs", "NAPI", "N-API", "Rust", "node-addon", "node-addon-api"],
+  "keywords": [
+    "napi-rs",
+    "NAPI",
+    "N-API",
+    "Rust",
+    "node-addon",
+    "node-addon-api"
+  ],
   "main": "index.darwin.node",
-  "files": ["index.darwin.node"],
+  "files": [
+    "index.darwin.node"
+  ],
   "publishConfig": {
     "registry": "https://registry.npmjs.org/",
     "access": "public"
   },
-  "os": ["darwin"],
-  "cpu": ["x64"]
-}
+  "os": [
+    "darwin"
+  ],
+  "cpu": [
+    "x64"
+  ]
+}

+ 19 - 6
npm/linux/package.json

@@ -1,16 +1,29 @@
 {
   "name": "@napi-rs/package-template-linux",
-  "version": "0.0.1",
+  "version": "0.0.2",
   "description": "Template project for writing node package with napi-rs",
   "repository": "git@github.com:napi-rs/package-template.git",
   "license": "MIT",
-  "keywords": ["napi-rs", "NAPI", "N-API", "Rust", "node-addon", "node-addon-api"],
+  "keywords": [
+    "napi-rs",
+    "NAPI",
+    "N-API",
+    "Rust",
+    "node-addon",
+    "node-addon-api"
+  ],
   "main": "index.linux.node",
-  "files": ["index.linux.node"],
+  "files": [
+    "index.linux.node"
+  ],
   "publishConfig": {
     "registry": "https://registry.npmjs.org/",
     "access": "public"
   },
-  "os": ["linux"],
-  "cpu": ["x64"]
-}
+  "os": [
+    "linux"
+  ],
+  "cpu": [
+    "x64"
+  ]
+}

+ 19 - 6
npm/win32/package.json

@@ -1,16 +1,29 @@
 {
   "name": "@napi-rs/package-template-win32",
-  "version": "0.0.1",
+  "version": "0.0.2",
   "description": "Template project for writing node package with napi-rs",
   "repository": "git@github.com:napi-rs/package-template.git",
   "license": "MIT",
-  "keywords": ["napi-rs", "NAPI", "N-API", "Rust", "node-addon", "node-addon-api"],
+  "keywords": [
+    "napi-rs",
+    "NAPI",
+    "N-API",
+    "Rust",
+    "node-addon",
+    "node-addon-api"
+  ],
   "main": "index.win32.node",
-  "files": ["index.win32.node"],
+  "files": [
+    "index.win32.node"
+  ],
   "publishConfig": {
     "registry": "https://registry.npmjs.org/",
     "access": "public"
   },
-  "os": ["win32"],
-  "cpu": ["x64"]
-}
+  "os": [
+    "win32"
+  ],
+  "cpu": [
+    "x64"
+  ]
+}

+ 33 - 9
package.json

@@ -1,14 +1,30 @@
 {
   "name": "@napi-rs/package-template",
-  "version": "0.0.1",
+  "version": "0.0.2",
   "description": "Template project for writing node package with napi-rs",
   "main": "index.js",
   "repository": "git@github.com:napi-rs/package-template.git",
   "license": "MIT",
-  "keywords": ["napi-rs", "NAPI", "N-API", "Rust", "node-addon", "node-addon-api"],
-  "files": ["index.d.ts", "index.js"],
-  "os": ["darwin", "linux", "win32"],
-  "cpu": ["x64"],
+  "keywords": [
+    "napi-rs",
+    "NAPI",
+    "N-API",
+    "Rust",
+    "node-addon",
+    "node-addon-api"
+  ],
+  "files": [
+    "index.d.ts",
+    "index.js"
+  ],
+  "os": [
+    "darwin",
+    "linux",
+    "win32"
+  ],
+  "cpu": [
+    "x64"
+  ],
   "engines": {
     "node": ">= 8.9"
   },
@@ -38,10 +54,18 @@
     "@node-rs/helper": "^0.2.1"
   },
   "lint-staged": {
-    "*.@(js|ts|tsx)": ["prettier --write"],
-    "*.@(yml|yaml)": ["prettier --parser yaml --write"],
-    "*.md": ["prettier --parser markdown --write"],
-    "*.json": ["prettier --parser json --write"]
+    "*.@(js|ts|tsx)": [
+      "prettier --write"
+    ],
+    "*.@(yml|yaml)": [
+      "prettier --parser yaml --write"
+    ],
+    "*.md": [
+      "prettier --parser markdown --write"
+    ],
+    "*.json": [
+      "prettier --parser json --write"
+    ]
   },
   "prettier": {
     "printWidth": 120,