package.json 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. },
  15. "engines": {
  16. "node": ">= 8.9"
  17. },
  18. "publishConfig": {
  19. "registry": "https://registry.npmjs.org/",
  20. "access": "public"
  21. },
  22. "scripts": {
  23. "artifacts": "napi artifacts",
  24. "build": "cargo build --release && napi build --platform --release",
  25. "build:debug": "cargo build && napi --platform",
  26. "format": "run-p format:md format:json format:yaml format:source format:rs",
  27. "format:md": "prettier --parser markdown --write './**/*.md'",
  28. "format:json": "prettier --parser json --write './**/*.json'",
  29. "format:rs": "cargo fmt",
  30. "format:source": "prettier --config ./package.json --write './**/*.{js,ts}'",
  31. "format:yaml": "prettier --parser yaml --write './**/*.{yml,yaml}'",
  32. "lint": "eslint . -c ./.eslintrc.yml './**/*.{ts,tsx,js}'",
  33. "prepublishOnly": "napi prepublish -t npm",
  34. "test": "ava",
  35. "version": "napi version"
  36. },
  37. "devDependencies": {
  38. "@octokit/rest": "^18.0.6",
  39. "@swc-node/register": "^0.4.11",
  40. "@typescript-eslint/eslint-plugin": "^4.2.0",
  41. "@typescript-eslint/parser": "^4.2.0",
  42. "ava": "^3.12.1",
  43. "chalk": "^4.1.0",
  44. "eslint": "^7.9.0",
  45. "eslint-config-prettier": "^6.11.0",
  46. "eslint-plugin-import": "^2.22.0",
  47. "eslint-plugin-prettier": "^3.1.4",
  48. "eslint-plugin-react": "^7.21.1",
  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. "putasset": "^5.0.3",
  57. "typescript": "^4.0.3"
  58. },
  59. "dependencies": {
  60. "@node-rs/helper": "^0.4.0"
  61. },
  62. "lint-staged": {
  63. "*.@(js|ts|tsx)": ["prettier --write", "eslint -c .eslintrc.yml --fix"],
  64. "*.@(yml|yaml)": ["prettier --parser yaml --write"],
  65. "*.md": ["prettier --parser markdown --write"],
  66. "*.json": ["prettier --parser json --write"]
  67. },
  68. "ava": {
  69. "require": ["@swc-node/register"],
  70. "extensions": ["ts"]
  71. },
  72. "prettier": {
  73. "printWidth": 120,
  74. "semi": false,
  75. "trailingComma": "all",
  76. "singleQuote": true,
  77. "arrowParens": "always",
  78. "parser": "typescript"
  79. },
  80. "husky": {
  81. "hooks": {
  82. "pre-commit": "lint-staged"
  83. }
  84. }
  85. }