package.json 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. {
  2. "name": "@napi-rs/canvas",
  3. "version": "0.1.97",
  4. "description": "Canvas for Node.js with skia backend",
  5. "main": "index.js",
  6. "repository": {
  7. "type": "git",
  8. "url": "git+https://github.com/Brooooooklyn/canvas.git"
  9. },
  10. "workspaces": [
  11. "e2e/*"
  12. ],
  13. "license": "MIT",
  14. "keywords": [
  15. "napi-rs",
  16. "NAPI",
  17. "N-API",
  18. "Rust",
  19. "node-addon",
  20. "node-addon-api",
  21. "canvas",
  22. "image",
  23. "pdf",
  24. "svg",
  25. "skia"
  26. ],
  27. "files": [
  28. "index.d.ts",
  29. "index.js",
  30. "geometry.js",
  31. "js-binding.js",
  32. "load-image.js",
  33. "node-canvas.js",
  34. "node-canvas.d.ts"
  35. ],
  36. "napi": {
  37. "binaryName": "skia",
  38. "targets": [
  39. "x86_64-unknown-linux-gnu",
  40. "x86_64-apple-darwin",
  41. "x86_64-pc-windows-msvc",
  42. "aarch64-pc-windows-msvc",
  43. "armv7-unknown-linux-gnueabihf",
  44. "x86_64-unknown-linux-musl",
  45. "aarch64-unknown-linux-gnu",
  46. "aarch64-unknown-linux-musl",
  47. "aarch64-apple-darwin",
  48. "aarch64-linux-android",
  49. "riscv64-unknown-linux-gnu"
  50. ]
  51. },
  52. "engines": {
  53. "node": ">= 10"
  54. },
  55. "publishConfig": {
  56. "registry": "https://registry.npmjs.org/",
  57. "access": "public"
  58. },
  59. "scripts": {
  60. "artifacts": "napi artifacts",
  61. "bench": "node --import @oxc-node/core/register benchmark/bench.ts",
  62. "build": "napi build --platform --release --js js-binding.js",
  63. "build:debug": "napi build --platform --js js-binding.js",
  64. "example-lottie": "yarn oxnode ./example/lottie-to-video.ts",
  65. "format": "run-p format:source format:rs format:toml",
  66. "format:rs": "cargo fmt",
  67. "format:source": "prettier . -w",
  68. "format:toml": "taplo format",
  69. "lint": "oxlint",
  70. "prepublishOnly": "pinst --disable && napi prepublish -t npm",
  71. "postpublish": "pinst --enable",
  72. "test:ci": "ava -c 1",
  73. "test": "ava",
  74. "e2e": "yarn workspace @napi-rs/canvas-e2e-webpack test",
  75. "version": "napi version && conventional-changelog -p angular -i CHANGELOG.md -s && git add ."
  76. },
  77. "devDependencies": {
  78. "@jimp/core": "^1.6.0",
  79. "@jimp/custom": "^0.22.12",
  80. "@jimp/jpeg": "^0.22.12",
  81. "@jimp/png": "^0.22.12",
  82. "@napi-rs/cli": "^3.5.0",
  83. "@napi-rs/webcodecs": "^1.1.1",
  84. "@octokit/rest": "^22.0.1",
  85. "@oxc-node/cli": "^0.0.35",
  86. "@oxc-node/core": "^0.0.35",
  87. "@taplo/cli": "^0.7.0",
  88. "@types/lodash": "^4.17.21",
  89. "@types/node": "^25.0.3",
  90. "@types/semver": "^7",
  91. "ava": "^7.0.0",
  92. "canvas": "^3.2.0",
  93. "canvaskit-wasm": "^0.40.0",
  94. "colorette": "^2.0.20",
  95. "conventional-changelog-cli": "^5.0.0",
  96. "core-js": "^3.47.0",
  97. "echarts": "^6.0.0",
  98. "electron": "^41.0.0",
  99. "husky": "^9.1.7",
  100. "lint-staged": "^16.2.7",
  101. "lodash": "^4.17.21",
  102. "npm-run-all2": "^8.0.4",
  103. "oxlint": "^1.34.0",
  104. "oxlint-tsgolint": "^0.17.0",
  105. "pinst": "^3.0.0",
  106. "png.js": "^0.2.1",
  107. "prettier": "^3.7.4",
  108. "pretty-bytes": "^7.1.0",
  109. "semver": "^7.7.3",
  110. "skia-canvas": "^3.0.8",
  111. "table": "^6.9.0",
  112. "tinybench": "^6.0.0",
  113. "typescript": "^5.9.3"
  114. },
  115. "lint-staged": {
  116. "*.@(js|ts|tsx|yml|yaml|md|json|html)": [
  117. "prettier --write"
  118. ],
  119. "*.@(js|ts|tsx)": [
  120. "oxlint --fix"
  121. ]
  122. },
  123. "ava": {
  124. "nodeArguments": [
  125. "--import=@oxc-node/core/register",
  126. "--import=core-js/proposals/promise-with-resolvers.js"
  127. ],
  128. "extensions": {
  129. "ts": "module"
  130. },
  131. "files": [
  132. "__test__/**/*.spec.ts",
  133. "scripts/__test__/**/*.spec.ts"
  134. ],
  135. "workerThreads": false,
  136. "cache": false,
  137. "timeout": "3m",
  138. "environmentVariables": {
  139. "SWC_NODE_PROJECT": "./tsconfig.json",
  140. "NODE_ENV": "ava"
  141. }
  142. },
  143. "prettier": {
  144. "printWidth": 120,
  145. "semi": false,
  146. "trailingComma": "all",
  147. "singleQuote": true,
  148. "arrowParens": "always"
  149. },
  150. "funding": {
  151. "type": "github",
  152. "url": "https://github.com/sponsors/Brooooooklyn"
  153. },
  154. "packageManager": "yarn@4.12.0",
  155. "optionalDependencies": {
  156. "@napi-rs/canvas-linux-x64-gnu": "0.1.97",
  157. "@napi-rs/canvas-darwin-x64": "0.1.97",
  158. "@napi-rs/canvas-win32-x64-msvc": "0.1.97",
  159. "@napi-rs/canvas-win32-arm64-msvc": "0.1.97",
  160. "@napi-rs/canvas-linux-arm-gnueabihf": "0.1.97",
  161. "@napi-rs/canvas-linux-x64-musl": "0.1.97",
  162. "@napi-rs/canvas-linux-arm64-gnu": "0.1.97",
  163. "@napi-rs/canvas-linux-arm64-musl": "0.1.97",
  164. "@napi-rs/canvas-darwin-arm64": "0.1.97",
  165. "@napi-rs/canvas-android-arm64": "0.1.97",
  166. "@napi-rs/canvas-linux-riscv64-gnu": "0.1.97"
  167. }
  168. }