package.json 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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.0.0",
  60. "@swc-node/register": "^1.4.2",
  61. "@typescript-eslint/eslint-plugin": "^5.7.0",
  62. "@typescript-eslint/parser": "^5.7.0",
  63. "ava": "^3.15.0",
  64. "benny": "^3.7.1",
  65. "chalk": "^5.0.0",
  66. "eslint": "^8.4.1",
  67. "eslint-config-prettier": "^8.3.0",
  68. "eslint-plugin-import": "^2.25.3",
  69. "eslint-plugin-prettier": "^4.0.0",
  70. "husky": "^7.0.4",
  71. "lint-staged": "^12.1.2",
  72. "npm-run-all": "^4.1.5",
  73. "prettier": "^2.5.1",
  74. "typescript": "^4.5.4"
  75. },
  76. "dependencies": {
  77. "@node-rs/helper": "^1.2.1"
  78. },
  79. "lint-staged": {
  80. "*.@(js|ts|tsx)": [
  81. "prettier --write",
  82. "eslint -c .eslintrc.yml --fix"
  83. ],
  84. "*.@(yml|yaml)": [
  85. "prettier --parser yaml --write"
  86. ],
  87. "*.md": [
  88. "prettier --parser markdown --write"
  89. ],
  90. "*.json": [
  91. "prettier --parser json --write"
  92. ]
  93. },
  94. "ava": {
  95. "require": [
  96. "@swc-node/register"
  97. ],
  98. "extensions": [
  99. "ts"
  100. ],
  101. "environmentVariables": {
  102. "TS_NODE_PROJECT": "./tsconfig.json"
  103. }
  104. },
  105. "prettier": {
  106. "printWidth": 120,
  107. "semi": false,
  108. "trailingComma": "all",
  109. "singleQuote": true,
  110. "arrowParens": "always"
  111. }
  112. }