package.json 2.8 KB

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