package.json 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. {
  2. "name": "@napi-rs/package-template",
  3. "version": "0.0.8",
  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. "os": ["darwin", "linux", "win32"],
  11. "cpu": ["x64"],
  12. "napi": {
  13. "name": "package-template",
  14. "musl": ["linux"]
  15. },
  16. "engines": {
  17. "node": ">= 8.9"
  18. },
  19. "publishConfig": {
  20. "registry": "https://registry.npmjs.org/",
  21. "access": "public"
  22. },
  23. "scripts": {
  24. "artifacts": "napi artifacts",
  25. "build": "cargo build --release && napi build --platform --release",
  26. "build:debug": "cargo build && napi --platform",
  27. "format": "run-p format:md format:json format:yaml format:source format:rs",
  28. "format:md": "prettier --parser markdown --write './**/*.md'",
  29. "format:json": "prettier --parser json --write './**/*.json'",
  30. "format:rs": "cargo fmt",
  31. "format:source": "prettier --config ./package.json --write './**/*.{js,ts}'",
  32. "format:yaml": "prettier --parser yaml --write './**/*.{yml,yaml}'",
  33. "lint": "eslint . -c ./.eslintrc.yml './**/*.{ts,tsx,js}'",
  34. "prepublishOnly": "napi prepublish -t npm",
  35. "test": "ava",
  36. "version": "napi version"
  37. },
  38. "devDependencies": {
  39. "@swc-node/register": "^1.0.0",
  40. "@typescript-eslint/eslint-plugin": "^4.2.0",
  41. "@typescript-eslint/parser": "^4.3.0",
  42. "ava": "^3.13.0",
  43. "chalk": "^4.1.0",
  44. "eslint": "^7.10.0",
  45. "eslint-config-prettier": "^6.12.0",
  46. "eslint-plugin-import": "^2.22.1",
  47. "eslint-plugin-prettier": "^3.1.4",
  48. "eslint-plugin-react": "^7.21.2",
  49. "eslint-plugin-react-hooks": "^4.1.2",
  50. "eslint-plugin-sonarjs": "^0.5.0",
  51. "husky": "^4.3.0",
  52. "lint-staged": "^10.4.0",
  53. "napi-rs": "^0.3.8",
  54. "npm-run-all": "^4.1.5",
  55. "prettier": "^2.1.2",
  56. "typescript": "^4.0.3"
  57. },
  58. "dependencies": {
  59. "@node-rs/helper": "^0.4.0"
  60. },
  61. "lint-staged": {
  62. "*.@(js|ts|tsx)": ["prettier --write", "eslint -c .eslintrc.yml --fix"],
  63. "*.@(yml|yaml)": ["prettier --parser yaml --write"],
  64. "*.md": ["prettier --parser markdown --write"],
  65. "*.json": ["prettier --parser json --write"]
  66. },
  67. "ava": {
  68. "require": ["@swc-node/register"],
  69. "extensions": ["ts"],
  70. "environmentVariables": {
  71. "SWC_NODE_PROJECT": "./tsconfig.json"
  72. }
  73. },
  74. "prettier": {
  75. "printWidth": 120,
  76. "semi": false,
  77. "trailingComma": "all",
  78. "singleQuote": true,
  79. "arrowParens": "always",
  80. "parser": "typescript"
  81. },
  82. "husky": {
  83. "hooks": {
  84. "pre-commit": "lint-staged"
  85. }
  86. }
  87. }