Skip to content

Commit

Permalink
pub
Browse files Browse the repository at this point in the history
  • Loading branch information
SOVLOOKUP committed Dec 6, 2023
1 parent 0d41a09 commit accbf4d
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 39 deletions.
74 changes: 37 additions & 37 deletions addon/package.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
{
"name": "rubick-native-addon",
"version": "0.0.0",
"main": "index.js",
"types": "index.d.ts",
"napi": {
"name": "rubick-native-addon",
"triples": {
"additional": [
"aarch64-unknown-linux-gnu",
"aarch64-unknown-linux-musl",
"x86_64-unknown-linux-musl",
"aarch64-apple-darwin",
"universal-apple-darwin",
"aarch64-pc-windows-msvc",
"i686-pc-windows-msvc"
]
}
},
"engines": {
"node": ">= 10"
},
"scripts": {
"artifacts": "napi artifacts",
"build": "napi build --platform --release && node ./postbuild.js",
"build:debug": "napi build --platform",
"prepublishOnly": "node ./prepub.js && napi prepublish -t npm",
"universal": "napi universal",
"version": "napi version"
},
"devDependencies": {
"@napi-rs/cli": "^2.16.5"
},
"files": [
"index.js",
"index.d.ts"
]
{
"name": "rubick-native-addon",
"version": "0.0.0",
"main": "index.js",
"types": "index.d.ts",
"napi": {
"name": "rubick-native-addon",
"triples": {
"additional": [
"aarch64-unknown-linux-gnu",
"aarch64-unknown-linux-musl",
"x86_64-unknown-linux-musl",
"aarch64-apple-darwin",
"universal-apple-darwin",
"aarch64-pc-windows-msvc",
"i686-pc-windows-msvc"
]
}
},
"engines": {
"node": ">= 10"
},
"scripts": {
"artifacts": "napi artifacts",
"build": "napi build --platform --release && node ./postbuild.js",
"build:debug": "napi build --platform",
"prepublishOnly": "node ./prepub.js && napi prepublish -t npm",
"universal": "napi universal",
"version": "napi version"
},
"devDependencies": {
"@napi-rs/cli": "^2.16.5"
},
"files": [
"index.js",
"index.d.ts"
]
}
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"name": "rubick-native",
"version": "0.0.16-beta",
"version": "0.0.16",
"type": "module",
"main": "dist/index.cjs",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "cd addon && npm run build && cd .. && tsup --cjsInterop"
"build": "cd addon && npm run build && cd .. && tsup --cjsInterop",
"prepublishOnly": "node ./prepub.js"
},
"devDependencies": {
"@types/node": "^20.10.3",
Expand Down
5 changes: 5 additions & 0 deletions prepub.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { readFileSync, writeFileSync } from "fs"

const pkg = { ...readFileSync('./package.json', 'utf8'), optionalDependencies: readFileSync('./addon/package.json', 'utf8').optionalDependencies }

writeFileSync('./package.json', pkg)

0 comments on commit accbf4d

Please sign in to comment.