package.json 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. {
  2. "name": "@napi-rs/package-template",
  3. "version": "0.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. "os": ["darwin", "linux", "win32"],
  11. "cpu": ["x64"],
  12. "engines": {
  13. "node": ">= 8.9"
  14. },
  15. "publishConfig": {
  16. "registry": "https://registry.npmjs.org/",
  17. "access": "public"
  18. },
  19. "scripts": {
  20. "build": "cargo build --release && napi --platform --release ./index",
  21. "build:debug": "cargo build && napi --platform ./index",
  22. "prepublish": "node ./scripts/publish.js",
  23. "test": "ava",
  24. "version": "node ./scripts/version.js"
  25. },
  26. "devDependencies": {
  27. "@octokit/rest": "^18.0.3",
  28. "ava": "^3.11.1",
  29. "chalk": "^4.1.0",
  30. "husky": "^4.2.5",
  31. "lint-staged": "^10.2.11",
  32. "napi-rs": "^0.2.4",
  33. "prettier": "^2.0.5",
  34. "putasset": "^5.0.3",
  35. "typescript": "^3.9.7"
  36. },
  37. "dependencies": {
  38. "@node-rs/helper": "^0.2.1"
  39. },
  40. "lint-staged": {
  41. "*.@(js|ts|tsx)": ["prettier --write"],
  42. "*.@(yml|yaml)": ["prettier --parser yaml --write"],
  43. "*.md": ["prettier --parser markdown --write"],
  44. "*.json": ["prettier --parser json --write"]
  45. },
  46. "prettier": {
  47. "printWidth": 120,
  48. "semi": false,
  49. "trailingComma": "all",
  50. "singleQuote": true,
  51. "arrowParens": "always",
  52. "parser": "typescript"
  53. },
  54. "husky": {
  55. "hooks": {
  56. "pre-commit": "lint-staged"
  57. }
  58. }
  59. }