-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/m-avagyan/webpack-react-t…
- Loading branch information
Showing
26 changed files
with
3,753 additions
and
1,958 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
/node_modules | ||
/build | ||
/coverage | ||
/dist |
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,17 +1,24 @@ | ||
/node_modules | ||
/build | ||
/coverage | ||
node_modules/ | ||
dist/ | ||
coverage/ | ||
|
||
.eslintcache | ||
.firebase/ | ||
.env | ||
|
||
.DS_Store | ||
.idea | ||
.vscode | ||
*.history | ||
*.sublime-project | ||
*.sublime-workspace | ||
|
||
.module-cache | ||
.DS_STORE | ||
*.log* | ||
*.iml | ||
*.swp | ||
*.swo | ||
|
||
logs | ||
*.log | ||
npm-debug.log* | ||
npm-error.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
logs | ||
*.log |
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,3 +1,3 @@ | ||
/node_modules | ||
/build | ||
/coverage | ||
/dist |
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,69 +1,65 @@ | ||
## webpack-react-typescript | ||
# webpack-react-typescript | ||
|
||
Template for create react app using webpack and typescript. | ||
Modern template to start creating react app using webpack and typescript 🚀 | ||
|
||
### | ||
## Getting Started | ||
|
||
<img src="https://i.morioh.com/bffbbd66ea.png" alt="webpack-react-typescript" /> | ||
Installing | ||
|
||
### | ||
- `git clone https://github.com/m-avagyan/webpack-react-typescript-template.git` | ||
- `cd webpack-react-typescript-template` | ||
- `yarn install --frozen-lockfile` | ||
|
||
## Quick Start | ||
Run Locally | ||
|
||
**Start the development** | ||
- `yarn dev` - server started at [localhost:3000](https://localhost:3000/) in local mode | ||
- `yarn start` - server started at [localhost:3000](https://localhost:3000/) in development mode | ||
- `yarn watch` - server started at [localhost:3000](https://localhost:3000/) in production mode | ||
|
||
- `git clone https://github.com/m-avagyan/webpack-react-typescript-template.git` | ||
- `yarn install` or `npm install` | ||
- `yarn start` or `npm start` | ||
- open [localhost:3000](http://localhost:3000) in your favorite browser | ||
Build Project | ||
|
||
**Build project** | ||
- `yarn clean` - clean the `dist/` directory | ||
- `yarn build` - we can see the output in `dist/` directory | ||
|
||
- `yarn build` or `npm run build` | ||
Analyze | ||
|
||
**Lint project** | ||
- `yarn analyze` - build project to `/dist` and analyze your bundle size in [localhost:3006](http://localhost:3006) | ||
|
||
- `yarn lint` or `npm run lint` | ||
Codebase | ||
|
||
**Fix autofixable eslint errors** | ||
- `yarn lint` - lint the codebase | ||
- `yarn format` - format the codebase using prettier | ||
|
||
- `yarn lint:fix` or `npm run lint:fix` | ||
### Tools and Technologies | ||
|
||
If `husky` pre-commit hook willn't work, please run `npx husky-init` command with cli (in project directory)<br /> and replace new `.husky/pre-commit` file with our. <br />Also I created `release.yml` file in `.github/workflows/`. This is for automation our releases with github bot,<br />so you need to add your script after `yarn build` command. | ||
- [ReactJS](https://reactjs.org/) | ||
- [React Router](https://reactrouter.com/en/main/) | ||
- [TypeScript](https://www.typescriptlang.org/) | ||
- [Webpack](https://webpack.js.org/) | ||
- [Styled Components](https://styled-components.com/) | ||
|
||
## Used technologies | ||
## Contributing | ||
|
||
- [React 17](https://reactjs.org/blog/2020/10/20/react-v17.html) as a front-end library. | ||
- [Webpack 5](https://webpack.js.org/) as a bundler. | ||
- [TypeScript](https://www.typescriptlang.org/) for type checking. | ||
- [React Router v6](https://v5.reactrouter.com/web/guides/quick-start) for application routing. | ||
- [i18next](https://www.i18next.com/) for localzation. | ||
- [eslint](https://eslint.org/) for lint code. | ||
- [prettier](https://prettier.io/) for format code. | ||
- [husky](https://typicode.github.io/husky/#/) for run any script before commit. | ||
- [commitlint](https://commitlint.js.org/#/) for conventional commit messages. | ||
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. | ||
|
||
## Commit Rules | ||
## Commits | ||
|
||
We are use commitlint for lint our commit messages and it has several rules for commits. <br /> | ||
- We use the [conventional commit lint](https://commitlint.js.org/#/) for linting our commit messages | ||
- Also before every commit we run the `lint` command using [husky](https://typicode.github.io/husky/#/) for lint our | ||
codebase | ||
|
||
**Commit types** | ||
--- | ||
|
||
- `chore`: a commit of the type chore includes the most important commits. | ||
- `docs`: a commit of the type docs includes the update of documentation. | ||
- `feat`: a commit of the type feat introduces a new feature to the codebase. | ||
- `fix`: a commit of the type fix patches a bug in your codebase. | ||
- `style`: a commit of the type style includes a css styling commit. | ||
- `refactor`: a commit of the type refactor includes a code refactoring to the codebase. | ||
- `revert`: a commit of the type revert is used when a developer wants to revert an old commit. | ||
- `unit`: a commit of the type unit includes a unit testing commit. | ||
- `test`: a commit for a testing the app work at difference environments | ||
- `wip`: work in process | ||
## Author | ||
|
||
**Examples** | ||
**Martik Avagyan** | ||
|
||
``` | ||
git commit -m "feat(readme): generate a readme file" | ||
git commit -m "fix(header): show current banner" | ||
git commit -m "chore(release): new release is ready" | ||
``` | ||
- Website: [martikavagyan.com](https://martikavagyan.com) | ||
- Twitter: [@martikavagyan](https://twitter.com/martikavagyan) | ||
- GitHub: [@m-avagyan](https://github.com/m-avagyan) | ||
|
||
--- | ||
|
||
## License | ||
|
||
[MIT](https://choosealicense.com/licenses/mit/) |
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,10 +1,6 @@ | ||
module.exports = { | ||
extends: ['@commitlint/config-conventional'], | ||
rules: { | ||
'type-enum': [ | ||
2, | ||
'always', | ||
['chore', 'docs', 'feat', 'fix', 'style', 'refactor', 'revert', 'unit', 'test', 'wip'], | ||
], | ||
'type-enum': [2, 'always', ['chore', 'docs', 'feat', 'fix', 'refactor', 'revert', 'unit', 'test', 'wip']], | ||
}, | ||
}; |
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
Empty file.
File renamed without changes.
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,4 @@ | ||
User-agent: * | ||
Allow: / | ||
|
||
Sitemap: https://www.<your-domain>/sitemap.xml |
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,9 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> | ||
<url> | ||
<loc>https://www.your-domain.com/</loc> | ||
<lastmod>2023-08-06</lastmod> | ||
<changefreq>weekly</changefreq> | ||
<priority>1</priority> | ||
</url> | ||
</urlset> |
Oops, something went wrong.