|
6 | 6 | "bugs": "https://github.com/accessible-ui/button/issues",
|
7 | 7 | "author": "Jared Lunde <[email protected]> (https://jaredLunde.com)",
|
8 | 8 | "license": "MIT",
|
9 |
| - "description": "An accessible button component for React that provides interop between real `<button>` elements and fake ones, e.g. `<div role='button'>`", |
| 9 | + "description": "An accessible button component for React that provides interop between real <button> elements and fake ones, e.g. <div role='button'>", |
10 | 10 | "keywords": [
|
11 | 11 | "react",
|
12 | 12 | "react component",
|
|
20 | 20 | "a11y",
|
21 | 21 | "react aria button",
|
22 | 22 | "aria",
|
23 |
| - "aria button" |
| 23 | + "aria button", |
| 24 | + "a11y button hook", |
| 25 | + "usea11ybutton", |
| 26 | + "use-a11y-button" |
24 | 27 | ],
|
25 | 28 | "main": "dist/main/index.js",
|
26 | 29 | "module": "dist/module/index.js",
|
| 30 | + "unpkg": "dist/umd/button.js", |
27 | 31 | "source": "src/index.tsx",
|
28 | 32 | "types": "types/index.d.ts",
|
29 |
| - "files": [ |
30 |
| - "/dist", |
31 |
| - "/src", |
32 |
| - "/types" |
33 |
| - ], |
34 | 33 | "exports": {
|
35 | 34 | ".": {
|
36 | 35 | "browser": "./dist/module/index.js",
|
37 | 36 | "import": "./dist/esm/index.mjs",
|
38 | 37 | "require": "./dist/main/index.js",
|
| 38 | + "umd": "./dist/umd/button.js", |
39 | 39 | "source": "./src/index.tsx",
|
40 | 40 | "types": "./types/index.d.ts",
|
41 | 41 | "default": "./dist/main/index.js"
|
42 | 42 | },
|
43 | 43 | "./package.json": "./package.json",
|
44 | 44 | "./": "./"
|
45 | 45 | },
|
| 46 | + "files": [ |
| 47 | + "/dist", |
| 48 | + "/src", |
| 49 | + "/types" |
| 50 | + ], |
46 | 51 | "sideEffects": false,
|
47 | 52 | "scripts": {
|
48 |
| - "build": "npm run build-esm && npm run build-main && npm run build-module && npm run build-types", |
49 |
| - "build-esm": "npm run compile -- -d dist/esm --env-name esm --out-file-extension .mjs", |
50 |
| - "build-main": "npm run compile -- -d dist/main --env-name main", |
51 |
| - "build-module": "npm run compile -- -d dist/module --env-name module", |
52 |
| - "build-types": "tsc -p tsconfig.json -d --outDir types --emitDeclarationOnly", |
53 |
| - "check-types": "tsc --noEmit -p tsconfig.json", |
54 |
| - "compile": "babel src -x .ts,.tsx --ignore \"**/*.test.ts\",\"**/*.test.tsx\" --delete-dir-on-start", |
55 |
| - "format": "prettier --write \"**/*.{ts,tsx,js,jsx,md,yml,json,eslintrc,prettierrc}\"", |
| 53 | + "build": "lundle build", |
| 54 | + "check-types": "lundle check-types", |
| 55 | + "dev": "lundle build -f module,cjs -w", |
| 56 | + "format": "prettier --write \"{,!(node_modules|dist|coverage)/**/}*.{ts,tsx,js,jsx,md,yml,json}\"", |
56 | 57 | "lint": "eslint . --ext .ts,.tsx",
|
57 |
| - "prepublishOnly": "npm run lint && npm run test && npm run build && npm run format", |
| 58 | + "prepublishOnly": "cli-confirm \"Did you run 'yarn release' first? (y/N)\"", |
| 59 | + "prerelease": "npm run validate && npm run build", |
| 60 | + "release": "git add . && standard-version -a", |
58 | 61 | "test": "jest",
|
59 |
| - "validate": "npm run check-types && npm run lint && npm run test -- --coverage" |
| 62 | + "validate": "lundle check-types && npm run lint && jest --coverage" |
60 | 63 | },
|
61 | 64 | "husky": {
|
62 | 65 | "hooks": {
|
63 |
| - "pre-commit": "npm run build-types && git add types && lint-staged" |
| 66 | + "pre-commit": "lundle check-types && lint-staged", |
| 67 | + "commit-msg": "commitlint -E HUSKY_GIT_PARAMS" |
64 | 68 | }
|
65 | 69 | },
|
66 | 70 | "lint-staged": {
|
67 | 71 | "**/*.{ts,tsx,js,jsx}": [
|
68 | 72 | "eslint",
|
69 | 73 | "prettier --write"
|
70 | 74 | ],
|
71 |
| - "**/*.{md,yml,json,eslintrc,prettierrc}": [ |
| 75 | + "**/*.{md,yml,json}": [ |
72 | 76 | "prettier --write"
|
73 | 77 | ]
|
74 | 78 | },
|
| 79 | + "commitlint": { |
| 80 | + "extends": [ |
| 81 | + "@commitlint/config-conventional" |
| 82 | + ] |
| 83 | + }, |
| 84 | + "config": { |
| 85 | + "commitizen": { |
| 86 | + "path": "./node_modules/cz-conventional-changelog" |
| 87 | + } |
| 88 | + }, |
| 89 | + "eslintConfig": { |
| 90 | + "extends": [ |
| 91 | + "lunde" |
| 92 | + ] |
| 93 | + }, |
| 94 | + "eslintIgnore": [ |
| 95 | + "node_modules", |
| 96 | + "coverage", |
| 97 | + "dist", |
| 98 | + "/types", |
| 99 | + "test", |
| 100 | + "*.config.js" |
| 101 | + ], |
| 102 | + "jest": { |
| 103 | + "moduleDirectories": [ |
| 104 | + "node_modules", |
| 105 | + "src", |
| 106 | + "test" |
| 107 | + ], |
| 108 | + "testMatch": [ |
| 109 | + "<rootDir>/src/**/?(*.)test.{ts,tsx}" |
| 110 | + ], |
| 111 | + "collectCoverageFrom": [ |
| 112 | + "**/src/**/*.{ts,tsx}" |
| 113 | + ], |
| 114 | + "setupFilesAfterEnv": [ |
| 115 | + "./test/setup.js" |
| 116 | + ], |
| 117 | + "snapshotResolver": "./test/resolve-snapshot.js", |
| 118 | + "globals": { |
| 119 | + "__DEV__": true |
| 120 | + } |
| 121 | + }, |
| 122 | + "prettier": { |
| 123 | + "semi": false, |
| 124 | + "singleQuote": true, |
| 125 | + "jsxSingleQuote": true, |
| 126 | + "bracketSpacing": false |
| 127 | + }, |
75 | 128 | "devDependencies": {
|
76 |
| - "@babel/preset-react": "latest", |
77 |
| - "@lunde/babel-preset-es": "latest", |
| 129 | + "@commitlint/cli": "latest", |
| 130 | + "@commitlint/config-conventional": "latest", |
78 | 131 | "@testing-library/jest-dom": "latest",
|
79 | 132 | "@testing-library/react": "latest",
|
80 | 133 | "@testing-library/react-hooks": "latest",
|
| 134 | + "@testing-library/user-event": "latest", |
81 | 135 | "@types/jest": "latest",
|
82 | 136 | "@types/react": "latest",
|
83 | 137 | "@types/react-dom": "latest",
|
84 |
| - "@typescript-eslint/eslint-plugin": "latest", |
85 |
| - "@typescript-eslint/parser": "latest", |
86 |
| - "babel-plugin-annotate-pure-calls": "latest", |
87 |
| - "babel-plugin-optimize-react": "latest", |
| 138 | + "babel-jest": "latest", |
| 139 | + "cli-confirm": "latest", |
| 140 | + "cz-conventional-changelog": "latest", |
88 | 141 | "eslint": "latest",
|
89 |
| - "eslint-import-resolver-jest": "latest", |
90 |
| - "eslint-plugin-jest": "latest", |
91 |
| - "eslint-plugin-react": "latest", |
92 |
| - "eslint-plugin-react-hooks": "latest", |
| 142 | + "eslint-config-lunde": "latest", |
93 | 143 | "husky": "latest",
|
94 | 144 | "jest": "latest",
|
95 | 145 | "lint-staged": "latest",
|
| 146 | + "lundle": "latest", |
96 | 147 | "prettier": "latest",
|
97 | 148 | "react": "latest",
|
98 | 149 | "react-dom": "latest",
|
99 | 150 | "react-test-renderer": "latest",
|
100 |
| - "ts-jest": "latest", |
| 151 | + "standard-version": "latest", |
101 | 152 | "typescript": "latest"
|
102 | 153 | },
|
103 | 154 | "dependencies": {
|
104 |
| - "@accessible/use-keycode": "^4.0.1", |
105 |
| - "@react-hook/merged-ref": "^1.1.1" |
| 155 | + "@accessible/use-key": "^1.0.2", |
| 156 | + "@react-hook/event": "^1.2.2", |
| 157 | + "@react-hook/merged-ref": "^1.3.0" |
106 | 158 | },
|
107 | 159 | "peerDependencies": {
|
108 |
| - "react": ">=16.8", |
109 |
| - "react-dom": ">=16.8" |
| 160 | + "react": ">=16.8" |
110 | 161 | }
|
111 | 162 | }
|
0 commit comments