update
This commit is contained in:
parent
26772cadc6
commit
fa3715c748
12
.npmignore
Normal file
12
.npmignore
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
Cargo.lock
|
||||||
|
Cargo.toml
|
||||||
|
.git
|
||||||
|
.github
|
||||||
|
.idea
|
||||||
|
node_modules/
|
||||||
|
npm/
|
||||||
|
scripts/
|
||||||
|
target/
|
||||||
|
|
||||||
|
package-lock.json
|
||||||
|
yarn.lock
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "rs-diff",
|
"name": "rs-diff-darwin",
|
||||||
"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",
|
||||||
"repository": "https://git.trj.tw/nodejs/rs-diff.git",
|
"repository": "https://git.trj.tw/nodejs/rs-diff.git",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "rs-diff",
|
"name": "rs-diff-linux",
|
||||||
"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",
|
||||||
"repository": "https://git.trj.tw/nodejs/rs-diff.git",
|
"repository": "https://git.trj.tw/nodejs/rs-diff.git",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "rs-diff",
|
"name": "rs-diff-win32",
|
||||||
"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",
|
||||||
"repository": "https://git.trj.tw/nodejs/rs-diff.git",
|
"repository": "https://git.trj.tw/nodejs/rs-diff.git",
|
||||||
|
@ -59,7 +59,6 @@
|
|||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"rs-diff-darwin": "^0.0.1",
|
"rs-diff-darwin": "^0.0.1",
|
||||||
"rs-diff-linux": "^0.0.1",
|
"rs-diff-linux": "^0.0.1"
|
||||||
"rs-diff-win32": "^0.0.1"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1 +1 @@
|
|||||||
module.exports = ['darwin', 'linux', 'win32']
|
module.exports = ['darwin', 'linux']
|
||||||
|
@ -17,6 +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`
|
||||||
|
if (!fs.existsSync(path.join(__dirname, '..', filename))) continue
|
||||||
const bindingFile = fs.readFileSync(path.join(__dirname, '..', 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', {
|
||||||
|
Loading…
Reference in New Issue
Block a user