update package.json
This commit is contained in:
parent
3de862d4c4
commit
26772cadc6
@ -4,6 +4,7 @@
|
|||||||
"description": "Template project for writing node package with napi-rs",
|
"description": "Template project for writing node package with napi-rs",
|
||||||
"repository": "https://git.trj.tw/nodejs/rs-diff.git",
|
"repository": "https://git.trj.tw/nodejs/rs-diff.git",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"author": "Jay <jay@trj.tw>",
|
||||||
"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",
|
"main": "index.darwin.node",
|
||||||
"files": ["index.darwin.node"],
|
"files": ["index.darwin.node"],
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
"description": "Template project for writing node package with napi-rs",
|
"description": "Template project for writing node package with napi-rs",
|
||||||
"repository": "https://git.trj.tw/nodejs/rs-diff.git",
|
"repository": "https://git.trj.tw/nodejs/rs-diff.git",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"author": "Jay <jay@trj.tw>",
|
||||||
"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",
|
"main": "index.linux.node",
|
||||||
"files": ["index.linux.node"],
|
"files": ["index.linux.node"],
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
"description": "Template project for writing node package with napi-rs",
|
"description": "Template project for writing node package with napi-rs",
|
||||||
"repository": "https://git.trj.tw/nodejs/rs-diff.git",
|
"repository": "https://git.trj.tw/nodejs/rs-diff.git",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"author": "Jay <jay@trj.tw>",
|
||||||
"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",
|
"main": "index.win32.node",
|
||||||
"files": ["index.win32.node"],
|
"files": ["index.win32.node"],
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
"name": "rs-diff",
|
"name": "rs-diff",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"description": "Template project for writing node package with napi-rs",
|
"description": "Template project for writing node package with napi-rs",
|
||||||
|
"author": "Jay <jay@trj.tw>",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"repository": "https://git.trj.tw/nodejs/rs-diff.git",
|
"repository": "https://git.trj.tw/nodejs/rs-diff.git",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@ -55,5 +56,10 @@
|
|||||||
"hooks": {
|
"hooks": {
|
||||||
"pre-commit": "lint-staged"
|
"pre-commit": "lint-staged"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"rs-diff-darwin": "^0.0.1",
|
||||||
|
"rs-diff-linux": "^0.0.1",
|
||||||
|
"rs-diff-win32": "^0.0.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ updatePackageJson(path.join(__dirname, '..', 'package.json'), {
|
|||||||
for (const name of platforms) {
|
for (const name of platforms) {
|
||||||
const pkgDir = path.join(__dirname, '..', 'npm', name)
|
const pkgDir = path.join(__dirname, '..', 'npm', name)
|
||||||
const filename = `index.${name}.node`
|
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)
|
fs.writeFileSync(path.join(pkgDir, filename), bindingFile)
|
||||||
execSync('npm publish', {
|
execSync('npm publish', {
|
||||||
cwd: pkgDir,
|
cwd: pkgDir,
|
||||||
|
Loading…
Reference in New Issue
Block a user