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