package.json 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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",
  51. "format:prettier": "prettier . -w",
  52. "format:rs": "cargo fmt",
  53. "lint": "eslint . -c ./.eslintrc.yml",
  54. "prepublishOnly": "napi prepublish -t npm",
  55. "test": "ava",
  56. "version": "napi version"
  57. },
  58. "devDependencies": {
  59. "@napi-rs/cli": "^2.9.0",
  60. "@swc-node/register": "^1.5.1",
  61. "@typescript-eslint/eslint-plugin": "^5.27.1",
  62. "@typescript-eslint/parser": "^5.27.1",
  63. "ava": "^4.3.0",
  64. "benny": "^3.7.1",
  65. "chalk": "^5.0.1",
  66. "eslint": "^8.17.0",
  67. "eslint-config-prettier": "^8.5.0",
  68. "eslint-plugin-import": "^2.26.0",
  69. "eslint-plugin-prettier": "^4.0.0",
  70. "husky": "^8.0.1",
  71. "lint-staged": "^13.0.1",
  72. "npm-run-all": "^4.1.5",
  73. "prettier": "^2.6.2",
  74. "typescript": "^4.7.3"
  75. },
  76. "lint-staged": {
  77. "*.@(js|ts|tsx)": [
  78. "eslint -c .eslintrc.yml --fix"
  79. ],
  80. "*.@(js|ts|tsx|yml|yaml|md|json)": [
  81. "prettier --write"
  82. ]
  83. },
  84. "ava": {
  85. "require": [
  86. "@swc-node/register"
  87. ],
  88. "extensions": [
  89. "ts"
  90. ],
  91. "environmentVariables": {
  92. "TS_NODE_PROJECT": "./tsconfig.json"
  93. }
  94. },
  95. "prettier": {
  96. "printWidth": 120,
  97. "semi": false,
  98. "trailingComma": "all",
  99. "singleQuote": true,
  100. "arrowParens": "always"
  101. },
  102. "packageManager": "yarn@3.2.1"
  103. }