Skip to content

Commit 25aa9a5

Browse files
authored
Merge pull request #19 from alioguzhan/alioguzhan/issue18
Alioguzhan/issue18
2 parents 3c90042 + 8deb43f commit 25aa9a5

File tree

12 files changed

+2342
-1826
lines changed

12 files changed

+2342
-1826
lines changed

.commitlintrc.js

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/workflows/release-please.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
name: release-please
6+
jobs:
7+
release-please:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: google-github-actions/release-please-action@v3
11+
with:
12+
release-type: node
13+
package-name: --libraryname--

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/sh
22
. "$(dirname "$0")/_/husky.sh"
33

4-
./node_modules/.bin/lint-staged
4+
yarn lint-staged

.versionrc.js

Lines changed: 0 additions & 23 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ A template to create a react component / library with Typescript.
1212
- Css Modules
1313
- Jest with code coverage report
1414
- `Typedoc` for API documentation
15-
- `standard-version` ready
1615
- `commitlint` for conventional-commits
1716
- `Prettier` and `ESLint` integration with git hooks
1817
- Optional `example app` generation for testing
1918
- `Github Pages` integration
19+
- Release-Please workflow
2020

2121
## Install
2222

commitlint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = { extends: ['@commitlint/config-conventional'] };

package.json

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -31,60 +31,60 @@
3131
"prepare": "husky install"
3232
},
3333
"engines": {
34-
"node": ">=10",
35-
"npm": ">=6"
34+
"node": ">=12"
3635
},
3736
"peerDependencies": {
3837
"react": ">=17",
3938
"react-dom": ">=17"
4039
},
4140
"devDependencies": {
42-
"@commitlint/cli": "^13.2.0",
43-
"@testing-library/jest-dom": "^5.14.1",
44-
"@testing-library/react": "^12.1.2",
45-
"@types/jest": "^27.0.2",
46-
"@types/node": "^16.10.3",
47-
"@types/react": "^17.0.27",
48-
"@types/react-dom": "^17.0.9",
49-
"@typescript-eslint/eslint-plugin": "^4.33.0",
50-
"@typescript-eslint/parser": "^4.33.0",
41+
"@commitlint/cli": "^17.1.2",
42+
"@commitlint/config-conventional": "^17.1.0",
43+
"@rollup/plugin-commonjs": "^22.0.2",
44+
"@rollup/plugin-json": "^4.1.0",
45+
"@rollup/plugin-node-resolve": "^13.3.0",
46+
"@testing-library/jest-dom": "^5.16.5",
47+
"@testing-library/react": "^13.4.0",
48+
"@types/jest": "^29.0.0",
49+
"@types/node": "^18.7.15",
50+
"@types/react": "^18.0.18",
51+
"@types/react-dom": "^18.0.6",
52+
"@typescript-eslint/eslint-plugin": "^5.36.1",
53+
"@typescript-eslint/parser": "^5.36.1",
5154
"colors": "^1.4.0",
5255
"cross-env": "^7.0.3",
53-
"eslint": "^7.32.0",
54-
"eslint-config-prettier": "^8.3.0",
55-
"eslint-config-standard": "^16.0.3",
56-
"eslint-plugin-import": "^2.24.2",
57-
"eslint-plugin-node": "^11.1.0",
58-
"eslint-plugin-prettier": "^4.0.0",
59-
"eslint-plugin-promise": "^5.1.0",
60-
"eslint-plugin-react": "^7.26.1",
61-
"eslint-plugin-react-hooks": "^4.2.0",
56+
"eslint": "^8.23.0",
57+
"eslint-config-prettier": "^8.5.0",
58+
"eslint-config-standard": "^17.0.0",
59+
"eslint-plugin-import": "^2.26.0",
60+
"eslint-plugin-n": "^15.2.5",
61+
"eslint-plugin-prettier": "^4.2.1",
62+
"eslint-plugin-promise": "^6.0.1",
63+
"eslint-plugin-react": "^7.31.6",
64+
"eslint-plugin-react-hooks": "^4.6.0",
6265
"eslint-plugin-standard": "^5.0.0",
63-
"gh-pages": "^3.2.3",
64-
"husky": "^7.0.2",
66+
"gh-pages": "^4.0.0",
67+
"husky": "^8.0.1",
6568
"identity-obj-proxy": "^3.0.0",
66-
"jest": "^27.2.4",
67-
"lint-staged": "^11.2.0",
68-
"postcss": "^8.3.9",
69-
"prettier": "^2.4.1",
70-
"prompt": "^1.2.0",
71-
"react": "^17.0.2",
72-
"react-dom": "^17.0.1",
73-
"replace-in-file": "^6.2.0",
74-
"rollup": "^2.58.0",
75-
"rollup-plugin-commonjs": "^10.1.0",
76-
"rollup-plugin-json": "^4.0.0",
77-
"rollup-plugin-node-resolve": "^5.2.0",
69+
"jest": "^29.0.2",
70+
"jest-environment-jsdom": "^29.0.2",
71+
"lint-staged": "^13.0.3",
72+
"postcss": "^8.4.16",
73+
"prettier": "^2.7.1",
74+
"prompt": "^1.3.0",
75+
"react": "^18.2.0",
76+
"react-dom": "^18.2.0",
77+
"replace-in-file": "^6.3.5",
78+
"rollup": "^2.79.0",
7879
"rollup-plugin-peer-deps-external": "^2.2.4",
79-
"rollup-plugin-postcss": "^4.0.1",
80+
"rollup-plugin-postcss": "^4.0.2",
8081
"rollup-plugin-sourcemaps": "^0.6.3",
8182
"rollup-plugin-terser": "^7.0.2",
82-
"rollup-plugin-typescript2": "^0.30.0",
83-
"shelljs": "^0.8.5",
84-
"ts-jest": "^27.0.5",
85-
"ts-node": "^10.2.1",
86-
"typedoc": "^0.22.5",
87-
"typescript": "^4.4.3"
83+
"rollup-plugin-typescript2": "^0.33.0",
84+
"ts-jest": "^28.0.8",
85+
"ts-node": "^10.9.1",
86+
"typedoc": "^0.23.14",
87+
"typescript": "^4.8.2"
8888
},
8989
"lint-staged": {
9090
"src/**/*.{ts,tsx}": [

rollup.config.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import commonjs from 'rollup-plugin-commonjs';
2-
import json from 'rollup-plugin-json';
3-
import resolve from 'rollup-plugin-node-resolve';
4-
import postcss from 'rollup-plugin-postcss';
1+
import commonjs from '@rollup/plugin-commonjs';
2+
import json from '@rollup/plugin-json';
3+
import resolve from '@rollup/plugin-node-resolve';
54
import external from 'rollup-plugin-peer-deps-external';
5+
import postcss from 'rollup-plugin-postcss';
66
import sourceMaps from 'rollup-plugin-sourcemaps';
77
import { terser } from 'rollup-plugin-terser';
88
import typescript from 'rollup-plugin-typescript2';
@@ -45,7 +45,6 @@ export default {
4545
// Compile TypeScript files
4646
typescript({
4747
useTsconfigDeclarationDir: true,
48-
rollupCommonJSResolveHack: true,
4948
exclude: ['**/__tests__/**', '*.spec.*', '*.test.*'],
5049
clean: true,
5150
}),

shell.nix

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
with import (fetchTarball https://github.com/NixOS/nixpkgs/archive/22.05.tar.gz) { };
2+
3+
stdenv.mkDerivation {
4+
name = "--libraryname--";
5+
6+
buildInputs = with pkgs; [
7+
git
8+
nodejs
9+
yarn
10+
];
11+
}

src/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import React, { useEffect } from 'react';
22
import styles from './styles.module.css';
33

4-
interface Props {
4+
/**
5+
* Main Component Props
6+
*/
7+
export interface Props {
58
message?: string;
69
}
710
/**

0 commit comments

Comments
 (0)