package.json 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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": ["napi-rs", "NAPI", "N-API", "Rust", "node-addon", "node-addon-api"],
  9. "files": ["index.d.ts", "index.js"],
  10. "napi": {
  11. "name": "package-template",
  12. "triples": {
  13. "defaults": true,
  14. "additional": [
  15. "x86_64-unknown-linux-musl",
  16. "aarch64-unknown-linux-gnu",
  17. "i686-pc-windows-msvc",
  18. "armv7-unknown-linux-gnueabihf",
  19. "aarch64-apple-darwin",
  20. "aarch64-linux-android",
  21. "x86_64-unknown-freebsd",
  22. "aarch64-unknown-linux-musl",
  23. "aarch64-pc-windows-msvc"
  24. ]
  25. }
  26. },
  27. "engines": {
  28. "node": ">= 10"
  29. },
  30. "publishConfig": {
  31. "registry": "https://registry.npmjs.org/",
  32. "access": "public"
  33. },
  34. "scripts": {
  35. "artifacts": "napi artifacts",
  36. "bench": "node -r ts-node/register/transpile-only benchmark/bench.ts",
  37. "build": "napi build --platform --release",
  38. "build:debug": "napi build --platform",
  39. "format": "run-p format:md format:json format:yaml format:source format:rs",
  40. "format:md": "prettier --parser markdown --write './**/*.md'",
  41. "format:json": "prettier --parser json --write './**/*.json'",
  42. "format:rs": "cargo fmt",
  43. "format:source": "prettier --config ./package.json --write './**/*.{js,ts}'",
  44. "format:yaml": "prettier --parser yaml --write './**/*.{yml,yaml}'",
  45. "lint": "eslint . -c ./.eslintrc.yml './**/*.{ts,tsx,js}'",
  46. "prepublishOnly": "napi prepublish -t npm",
  47. "test": "ava",
  48. "version": "napi version"
  49. },
  50. "devDependencies": {
  51. "@napi-rs/cli": "^1.0.4",
  52. "@swc-node/register": "^1.3.1",
  53. "@typescript-eslint/eslint-plugin": "^4.26.0",
  54. "@typescript-eslint/parser": "^4.26.0",
  55. "ava": "^3.15.0",
  56. "benny": "^3.6.15",
  57. "chalk": "^4.1.1",
  58. "eslint": "^7.27.0",
  59. "eslint-config-prettier": "^8.3.0",
  60. "eslint-plugin-import": "^2.23.4",
  61. "eslint-plugin-prettier": "^3.4.0",
  62. "eslint-plugin-sonarjs": "^0.7.0",
  63. "husky": "^6.0.0",
  64. "lint-staged": "^11.0.0",
  65. "npm-run-all": "^4.1.5",
  66. "prettier": "^2.3.0",
  67. "typescript": "^4.3.2"
  68. },
  69. "dependencies": {
  70. "@node-rs/helper": "^1.1.1"
  71. },
  72. "lint-staged": {
  73. "*.@(js|ts|tsx)": ["prettier --write", "eslint -c .eslintrc.yml --fix"],
  74. "*.@(yml|yaml)": ["prettier --parser yaml --write"],
  75. "*.md": ["prettier --parser markdown --write"],
  76. "*.json": ["prettier --parser json --write"]
  77. },
  78. "ava": {
  79. "require": ["@swc-node/register"],
  80. "extensions": ["ts"],
  81. "environmentVariables": {
  82. "TS_NODE_PROJECT": "./tsconfig.json"
  83. }
  84. },
  85. "prettier": {
  86. "printWidth": 120,
  87. "semi": false,
  88. "trailingComma": "all",
  89. "singleQuote": true,
  90. "arrowParens": "always",
  91. "parser": "typescript"
  92. }
  93. }