-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: maintain all dev dependencies and build process (#27)
Co-authored-by: Justin Schrader <[email protected]>
- Loading branch information
1 parent
dcbe4fd
commit d7f053e
Showing
22 changed files
with
9,717 additions
and
7,154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
yarn commitlint --edit $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
yarn build && yarn lint && yarn test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
yarn build && yarn types && yarn lint && yarn test-build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v14.15.3 | ||
v15.14.0 |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
nodeLinker: node-modules | ||
|
||
plugins: | ||
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs | ||
spec: "@yarnpkg/plugin-interactive-tools" | ||
|
||
yarnPath: .yarn/releases/yarn-2.4.2.cjs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,65 @@ | ||
{ | ||
"name": "use-react-router-breadcrumbs", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "A hook for displaying and setting breadcrumbs for react router", | ||
"main": "dist/cjs/index.js", | ||
"module": "dist/es/index.js", | ||
"umd": "dist/umd/index.js", | ||
"repository": "[email protected]:icd2k3/use-react-router-breadcrumbs.git", | ||
"author": "Justin Schrader <[email protected]>", | ||
"license": "MIT", | ||
"private": false, | ||
"types": "dist/index.d.ts", | ||
"peerDependencies": { | ||
"react": ">=16.8", | ||
"react-router": ">=5.1.0" | ||
}, | ||
"scripts": { | ||
"prepublishOnly": "npm run build", | ||
"prepublishOnly": "yarn build && pinst --disable", | ||
"build": "rollup -c", | ||
"test": "jest", | ||
"test-build": "sh ./scripts/test-build.sh", | ||
"types": "tsc -p tsconfig.json", | ||
"lint": "eslint ./src/**" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS", | ||
"pre-commit": "yarn build && yarn lint && yarn test", | ||
"pre-push": "yarn build && yarn types && yarn lint && yarn test-build" | ||
} | ||
"lint": "eslint ./src/**", | ||
"postpublish": "pinst --enable", | ||
"prepare": "husky install" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "^7.8.4", | ||
"@babel/core": "^7.8.7", | ||
"@babel/preset-env": "^7.8.7", | ||
"@babel/preset-react": "^7.8.3", | ||
"@babel/preset-typescript": "^7.8.3", | ||
"@commitlint/cli": "^11.0.0", | ||
"@commitlint/config-conventional": "^11.0.0", | ||
"@rollup/plugin-commonjs": "^17.0.0", | ||
"@rollup/plugin-node-resolve": "^11.0.1", | ||
"@types/react": "^17.0.0", | ||
"@types/react-dom": "^17.0.0", | ||
"@types/react-router": "^5.1.4", | ||
"@typescript-eslint/eslint-plugin": "^4.10.0", | ||
"@typescript-eslint/parser": "^4.10.0", | ||
"@wojtekmaj/enzyme-adapter-react-17": "^0.4.1", | ||
"@babel/cli": "^7.14.3", | ||
"@babel/core": "^7.14.3", | ||
"@babel/plugin-transform-runtime": "^7.14.3", | ||
"@babel/preset-env": "^7.14.4", | ||
"@babel/preset-react": "^7.13.13", | ||
"@babel/preset-typescript": "^7.13.0", | ||
"@commitlint/cli": "^12.1.4", | ||
"@commitlint/config-conventional": "^12.1.4", | ||
"@rollup/plugin-babel": "^5.3.0", | ||
"@rollup/plugin-typescript": "^8.2.1", | ||
"@types/react": "^17.0.11", | ||
"@types/react-dom": "^17.0.7", | ||
"@types/react-router": "^5.1.15", | ||
"@typescript-eslint/eslint-plugin": "^4.26.1", | ||
"@typescript-eslint/parser": "^4.26.1", | ||
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.1", | ||
"babel-eslint": "^10.1.0", | ||
"babel-jest": "^26.6.3", | ||
"coveralls": "^3.0.9", | ||
"enzyme": "^3.11.0", | ||
"eslint": "^7.16.0", | ||
"eslint-config-airbnb": "^18.1.0", | ||
"eslint-config-prettier": "^7.1.0", | ||
"eslint-plugin-import": "^2.20.1", | ||
"eslint-plugin-jsx-a11y": "^6.2.3", | ||
"eslint-plugin-prettier": "^3.1.3", | ||
"eslint-plugin-react": "^7.19.0", | ||
"eslint": "^7.28.0", | ||
"eslint-config-airbnb": "^18.2.1", | ||
"eslint-plugin-import": "^2.23.4", | ||
"eslint-plugin-jsx-a11y": "^6.4.1", | ||
"eslint-plugin-react": "^7.24.0", | ||
"eslint-plugin-react-hooks": "^4.2.0", | ||
"husky": "^4.2.1", | ||
"jest": "^26.6.3", | ||
"js-yaml": "^3.13.1", | ||
"prettier": "^2.0.5", | ||
"husky": "^6.0.0", | ||
"jest": "^27.0.4", | ||
"jsdom-global": "^3.0.2", | ||
"pinst": "^2.1.6", | ||
"prop-types": "^15.7.2", | ||
"react": "^17.0.1", | ||
"react-dom": "^17.0.1", | ||
"react-router": "^5.1.2", | ||
"rollup": "^2.1.0", | ||
"rollup-plugin-babel": "^4.4.0", | ||
"react": "^17.0.2", | ||
"react-dom": "^17.0.2", | ||
"react-router": "^5.2.0", | ||
"rollup": "^2.51.1", | ||
"rollup-plugin-size": "^0.2.2", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"rollup-plugin-typescript2": "^0.29.0", | ||
"typescript": "^4.1.3" | ||
"typescript": "^4.3.2" | ||
}, | ||
"keywords": [ | ||
"react", | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,65 +1,51 @@ | ||
import babel from 'rollup-plugin-babel'; | ||
import commonjs from '@rollup/plugin-commonjs'; | ||
import resolve from '@rollup/plugin-node-resolve'; | ||
import babel from '@rollup/plugin-babel'; | ||
import typescript from '@rollup/plugin-typescript'; | ||
import size from 'rollup-plugin-size'; | ||
import { terser } from 'rollup-plugin-terser'; | ||
import typescript from 'rollup-plugin-typescript2'; | ||
import ts from 'typescript'; | ||
|
||
import pkg from './package.json'; | ||
|
||
const external = Object.keys(pkg.peerDependencies); | ||
const external = Object.keys(pkg.peerDependencies).concat(/@babel\/runtime/); | ||
|
||
const extensions = ['.js', '.tsx']; | ||
|
||
const plugins = [ | ||
typescript({ | ||
useTsconfigDeclarationDir: true, | ||
tsconfigOverride: { | ||
typescript: ts, | ||
compilerOptions: { | ||
module: 'es2015', | ||
}, | ||
}, | ||
}), | ||
const sharedPlugins = [ | ||
typescript(), | ||
babel({ | ||
babelHelpers: 'runtime', | ||
exclude: 'node_modules/**', | ||
extensions, | ||
}), | ||
resolve({ | ||
mainFields: ['module', 'main', 'umd'], | ||
extensions, | ||
}), | ||
size(), | ||
]; | ||
|
||
const exports = [ | ||
{ | ||
format: 'cjs', | ||
file: pkg.main, | ||
plugins: plugins.concat([commonjs(), terser()]), | ||
}, | ||
{ | ||
format: 'umd', | ||
file: pkg.umd, | ||
plugins: plugins.concat([commonjs(), terser()]), | ||
}, | ||
{ format: 'es', file: pkg.module, plugins }, | ||
const formats = [ | ||
{ format: 'umd', file: pkg.umd, plugins: sharedPlugins.concat([terser({ format: { comments: false } })]) }, | ||
{ format: 'cjs', file: pkg.main, plugins: sharedPlugins }, | ||
{ format: 'es', file: pkg.module, plugins: sharedPlugins }, | ||
]; | ||
|
||
const globals = { | ||
react: 'React', | ||
'react-router': 'ReactRouter', | ||
}; | ||
|
||
export default exports.map((item) => ({ | ||
export default formats.map(({ plugins, file, format }) => ({ | ||
input: 'src/index.tsx', | ||
plugins: item.plugins, | ||
plugins, | ||
external, | ||
output: { | ||
exports: 'named', | ||
file: item.file, | ||
format: item.format, | ||
name: 'use-react-router-breadcrumbs', | ||
globals, | ||
sourcemap: true, | ||
file, | ||
format, | ||
name: 'react-router-breadcrumbs-hoc', | ||
globals: format !== 'umd' | ||
? globals | ||
: { | ||
...globals, | ||
'@babel/runtime/helpers/toConsumableArray': '_toConsumableArray', | ||
'@babel/runtime/helpers/defineProperty': '_defineProperty', | ||
'@babel/runtime/helpers/objectWithoutProperties': '_objectWithoutProperties', | ||
}, | ||
}, | ||
})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.