package.json 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. {
  2. "name": "@napi-rs/package-template",
  3. "version": "1.0.0",
  4. "description": "Template project for writing node package with napi-rs",
  5. "main": "index.js",
  6. "repository": "git@github.com:napi-rs/package-template.git",
  7. "license": "MIT",
  8. "keywords": [
  9. "napi-rs",
  10. "NAPI",
  11. "N-API",
  12. "Rust",
  13. "node-addon",
  14. "node-addon-api"
  15. ],
  16. "files": [
  17. "index.d.ts",
  18. "index.js"
  19. ],
  20. "napi": {
  21. "name": "package-template",
  22. "triples": {
  23. "defaults": true,
  24. "additional": [
  25. "x86_64-unknown-linux-musl",
  26. "aarch64-unknown-linux-gnu",
  27. "i686-pc-windows-msvc",
  28. "armv7-unknown-linux-gnueabihf",
  29. "aarch64-apple-darwin",
  30. "aarch64-linux-android",
  31. "x86_64-unknown-freebsd",
  32. "aarch64-unknown-linux-musl",
  33. "aarch64-pc-windows-msvc",
  34. "armv7-linux-androideabi"
  35. ]
  36. }
  37. },
  38. "engines": {
  39. "node": ">= 10"
  40. },
  41. "publishConfig": {
  42. "registry": "https://registry.npmjs.org/",
  43. "access": "public"
  44. },
  45. "scripts": {
  46. "artifacts": "napi artifacts",
  47. "bench": "node -r @swc-node/register benchmark/bench.ts",
  48. "build": "napi build --platform --release --pipe \"prettier -w\"",
  49. "build:debug": "napi build --platform --pipe \"prettier -w\"",
  50. "format": "run-p format:prettier format:rs format:toml",
  51. "format:prettier": "prettier . -w",
  52. "format:toml": "taplo format",
  53. "format:rs": "cargo fmt",
  54. "lint": "eslint . -c ./.eslintrc.yml",
  55. "prepublishOnly": "napi prepublish -t npm",
  56. "test": "ava",
  57. "version": "napi version"
  58. },
  59. "devDependencies": {
  60. "@napi-rs/cli": "^2.16.4",
  61. "@swc-node/register": "^1.6.8",
  62. "@swc/core": "^1.3.95",
  63. "@taplo/cli": "^0.7.0",
  64. "@typescript-eslint/eslint-plugin": "^7.0.0",
  65. "@typescript-eslint/parser": "^7.0.0",
  66. "ava": "^6.0.0",
  67. "benny": "^3.7.1",
  68. "chalk": "^5.3.0",
  69. "eslint": "^8.52.0",
  70. "eslint-config-prettier": "^9.0.0",
  71. "eslint-plugin-import": "^2.29.0",
  72. "eslint-plugin-prettier": "^5.0.1",
  73. "husky": "^9.0.0",
  74. "lint-staged": "^15.0.2",
  75. "npm-run-all2": "^6.0.0",
  76. "prettier": "^3.0.3",
  77. "typescript": "^5.2.2"
  78. },
  79. "lint-staged": {
  80. "*.@(js|ts|tsx)": [
  81. "eslint -c .eslintrc.yml --fix"
  82. ],
  83. "*.@(js|ts|tsx|yml|yaml|md|json)": [
  84. "prettier --write"
  85. ],
  86. "*.toml": [
  87. "taplo format"
  88. ]
  89. },
  90. "ava": {
  91. "require": [
  92. "@swc-node/register"
  93. ],
  94. "extensions": [
  95. "ts"
  96. ],
  97. "timeout": "2m",
  98. "workerThreads": false,
  99. "environmentVariables": {
  100. "TS_NODE_PROJECT": "./tsconfig.json"
  101. }
  102. },
  103. "prettier": {
  104. "printWidth": 120,
  105. "semi": false,
  106. "trailingComma": "all",
  107. "singleQuote": true,
  108. "arrowParens": "always"
  109. },
  110. "packageManager": "yarn@4.2.2"
  111. }