From 26772cadc63bdfe2c7e5f99b1607280ba98ed649 Mon Sep 17 00:00:00 2001 From: Jay Date: Tue, 25 Aug 2020 11:38:13 +0800 Subject: [PATCH] update package.json --- npm/darwin/package.json | 1 + npm/linux/package.json | 1 + npm/win32/package.json | 1 + package.json | 6 ++++++ scripts/publish.js | 2 +- 5 files changed, 10 insertions(+), 1 deletion(-) diff --git a/npm/darwin/package.json b/npm/darwin/package.json index c31ff81..0de111b 100644 --- a/npm/darwin/package.json +++ b/npm/darwin/package.json @@ -4,6 +4,7 @@ "description": "Template project for writing node package with napi-rs", "repository": "https://git.trj.tw/nodejs/rs-diff.git", "license": "MIT", + "author": "Jay ", "keywords": ["napi-rs", "NAPI", "N-API", "Rust", "node-addon", "node-addon-api"], "main": "index.darwin.node", "files": ["index.darwin.node"], diff --git a/npm/linux/package.json b/npm/linux/package.json index cd0953f..b58fada 100644 --- a/npm/linux/package.json +++ b/npm/linux/package.json @@ -4,6 +4,7 @@ "description": "Template project for writing node package with napi-rs", "repository": "https://git.trj.tw/nodejs/rs-diff.git", "license": "MIT", + "author": "Jay ", "keywords": ["napi-rs", "NAPI", "N-API", "Rust", "node-addon", "node-addon-api"], "main": "index.linux.node", "files": ["index.linux.node"], diff --git a/npm/win32/package.json b/npm/win32/package.json index c1f567e..84dd4c4 100644 --- a/npm/win32/package.json +++ b/npm/win32/package.json @@ -4,6 +4,7 @@ "description": "Template project for writing node package with napi-rs", "repository": "https://git.trj.tw/nodejs/rs-diff.git", "license": "MIT", + "author": "Jay ", "keywords": ["napi-rs", "NAPI", "N-API", "Rust", "node-addon", "node-addon-api"], "main": "index.win32.node", "files": ["index.win32.node"], diff --git a/package.json b/package.json index fe6cac4..7f1c2a1 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "rs-diff", "version": "0.0.1", "description": "Template project for writing node package with napi-rs", + "author": "Jay ", "main": "index.js", "repository": "https://git.trj.tw/nodejs/rs-diff.git", "license": "MIT", @@ -55,5 +56,10 @@ "hooks": { "pre-commit": "lint-staged" } + }, + "optionalDependencies": { + "rs-diff-darwin": "^0.0.1", + "rs-diff-linux": "^0.0.1", + "rs-diff-win32": "^0.0.1" } } diff --git a/scripts/publish.js b/scripts/publish.js index 7012a41..874fd6e 100644 --- a/scripts/publish.js +++ b/scripts/publish.js @@ -17,7 +17,7 @@ updatePackageJson(path.join(__dirname, '..', 'package.json'), { for (const name of platforms) { const pkgDir = path.join(__dirname, '..', 'npm', name) const filename = `index.${name}.node` - const bindingFile = fs.readFileSync(path.join(__dirname, '..', `bindings-${name}`, filename)) + const bindingFile = fs.readFileSync(path.join(__dirname, '..', filename)) fs.writeFileSync(path.join(pkgDir, filename), bindingFile) execSync('npm publish', { cwd: pkgDir,