package.json 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. ]
  22. }
  23. },
  24. "engines": {
  25. "node": ">= 10"
  26. },
  27. "publishConfig": {
  28. "registry": "https://registry.npmjs.org/",
  29. "access": "public"
  30. },
  31. "scripts": {
  32. "artifacts": "napi artifacts",
  33. "bench": "node -r ts-node/register/transpile-only benchmark/bench.ts",
  34. "build": "napi build --platform --release",
  35. "build:debug": "napi build --platform",
  36. "format": "run-p format:md format:json format:yaml format:source format:rs",
  37. "format:md": "prettier --parser markdown --write './**/*.md'",
  38. "format:json": "prettier --parser json --write './**/*.json'",
  39. "format:rs": "cargo fmt",
  40. "format:source": "prettier --config ./package.json --write './**/*.{js,ts}'",
  41. "format:yaml": "prettier --parser yaml --write './**/*.{yml,yaml}'",
  42. "lint": "eslint . -c ./.eslintrc.yml './**/*.{ts,tsx,js}'",
  43. "prepublishOnly": "napi prepublish -t npm",
  44. "test": "ava",
  45. "version": "napi version"
  46. },
  47. "devDependencies": {
  48. "@napi-rs/cli": "^1.0.3",
  49. "@typescript-eslint/eslint-plugin": "^4.16.1",
  50. "@typescript-eslint/parser": "^4.16.1",
  51. "ava": "^3.15.0",
  52. "benny": "^3.6.15",
  53. "chalk": "^4.1.0",
  54. "eslint": "^7.22.0",
  55. "eslint-config-prettier": "^8.1.0",
  56. "eslint-plugin-import": "^2.22.1",
  57. "eslint-plugin-prettier": "^3.3.1",
  58. "eslint-plugin-sonarjs": "^0.6.0",
  59. "husky": "^5.1.2",
  60. "lint-staged": "^10.5.4",
  61. "npm-run-all": "^4.1.5",
  62. "prettier": "^2.2.1",
  63. "ts-node": "^9.1.1",
  64. "typescript": "^4.2.3"
  65. },
  66. "dependencies": {
  67. "@node-rs/helper": "^1.1.0"
  68. },
  69. "lint-staged": {
  70. "*.@(js|ts|tsx)": ["prettier --write", "eslint -c .eslintrc.yml --fix"],
  71. "*.@(yml|yaml)": ["prettier --parser yaml --write"],
  72. "*.md": ["prettier --parser markdown --write"],
  73. "*.json": ["prettier --parser json --write"]
  74. },
  75. "ava": {
  76. "require": ["ts-node/register/transpile-only"],
  77. "extensions": ["ts"],
  78. "environmentVariables": {
  79. "TS_NODE_PROJECT": "./tsconfig.json"
  80. }
  81. },
  82. "prettier": {
  83. "printWidth": 120,
  84. "semi": false,
  85. "trailingComma": "all",
  86. "singleQuote": true,
  87. "arrowParens": "always",
  88. "parser": "typescript"
  89. },
  90. "husky": {
  91. "hooks": {
  92. "pre-commit": "lint-staged"
  93. }
  94. }
  95. }