-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
flamarionfagundes
committed
Sep 24, 2022
0 parents
commit 6930ea5
Showing
60 changed files
with
13,672 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
root = true | ||
|
||
[*] | ||
ident_style = spaces | ||
ident_size = 2 | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true |
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,40 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es2021": true, | ||
"jest": true, | ||
"node": true | ||
}, | ||
"settings": { | ||
"react": { | ||
"version": "detect" | ||
} | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:react/recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:prettier/recommended" | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaFeatures": { | ||
"jsx": true | ||
}, | ||
"ecmaVersion": "latest", | ||
"sourceType": "module" | ||
}, | ||
"plugins": [ | ||
"react", | ||
"@typescript-eslint", | ||
"react-hooks" | ||
], | ||
"rules": { | ||
"react-hooks/rules-of-hooks": "error", | ||
"react-hooks/exhaustive-deps": "warn", | ||
"react/prop-types": "off", | ||
"react/react-in-jsx-scope": "off", | ||
"@typescript-eslint/no-var-requires": "off", | ||
"@typescript-eslint/explicit-module-boundary-types": "off" | ||
} | ||
} |
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,27 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
dist | ||
dist-ssr | ||
*.local | ||
|
||
# testing | ||
coverage | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
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,5 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
yarn lint --fix | ||
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 @@ | ||
import '@testing-library/jest-dom' |
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,8 @@ | ||
{ | ||
"trailingComma": "es5", | ||
"tabWidth": 2, | ||
"printWidth": 100, | ||
"semi": true, | ||
"singleQuote": true, | ||
"endOfLine": "auto" | ||
} |
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,26 @@ | ||
module.exports = { | ||
"stories": [ | ||
"../src/components/**/*.stories.tsx", | ||
"../src/pages/**/*.stories.tsx" | ||
], | ||
"addons": [ | ||
"@storybook/addon-links", | ||
"@storybook/addon-essentials", | ||
"@storybook/addon-interactions", | ||
{ | ||
name: "@storybook/addon-postcss", | ||
options: { | ||
postcssLoaderOptions: { | ||
implementation: require("postcss"), | ||
}, | ||
}, | ||
}, | ||
], | ||
"framework": "@storybook/react", | ||
"core": { | ||
"builder": "@storybook/builder-vite" | ||
}, | ||
"features": { | ||
"storyStoreV7": true | ||
} | ||
} |
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,5 @@ | ||
<link href="/styles/roboto.css" rel="stylesheet"> | ||
|
||
<script> | ||
window.global = window; | ||
</script> |
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,11 @@ | ||
import '../src/styles/global.css'; | ||
|
||
export const parameters = { | ||
actions: { argTypesRegex: "^on[A-Z].*" }, | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/, | ||
}, | ||
}, | ||
} |
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,29 @@ | ||
export default function (plop) { | ||
plop.setGenerator('component', { | ||
description: 'application component logic', | ||
prompts: [ | ||
{ | ||
type: 'input', | ||
name: 'name', | ||
message: 'Nome do componente', | ||
}, | ||
], | ||
actions: [ | ||
{ | ||
type: 'add', | ||
path: '../src/components/{{pascalCase name}}/{{pascalCase name}}.tsx', | ||
templateFile: 'templates/component.tsx.hbs', | ||
}, | ||
{ | ||
type: 'add', | ||
path: '../src/components/{{pascalCase name}}/{{pascalCase name}}.stories.tsx', | ||
templateFile: 'templates/stories.tsx.hbs', | ||
}, | ||
{ | ||
type: 'add', | ||
path: '../src/components/{{pascalCase name}}/{{pascalCase name}}.test.tsx', | ||
templateFile: 'templates/test.ts.hbs', | ||
}, | ||
], | ||
}); | ||
} |
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 @@ | ||
import * as S from './{{pascalCase name}}.styles'; | ||
|
||
export const {{pascalCase name}} = () => { | ||
return ( | ||
<S.Wrapper> | ||
<h1>{{pascalCase name}}</h1> | ||
</S.Wrapper> | ||
); | ||
}; |
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,13 @@ | ||
import React from 'react'; | ||
import { Story } from '@storybook/react'; | ||
import { {{pascalCase name}} } from './{{pascalCase name}}'; | ||
|
||
const Template: Story = (args) => <{{pascalCase name}} {...args} />; | ||
|
||
export const Default = Template.bind({}); | ||
Default.args = {}; | ||
|
||
export default { | ||
title: 'components/{{pascalCase name}}', | ||
component: {{pascalCase name}}, | ||
}; |
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,10 @@ | ||
import { render, screen } from '@testing-library/react'; | ||
import { {{pascalCase name}} } from './{{pascalCase name}}'; | ||
|
||
describe('Testing the {{pascalCase name}} component', () => { | ||
it('should render correctly', () => { | ||
render(<{{pascalCase name}} />); | ||
|
||
expect(screen.getByRole('div')).toBeInTheDocument(); | ||
}); | ||
}); |
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,14 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link href="/styles/roboto.css" rel="stylesheet"> | ||
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Vite + React + TS</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
</html> |
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,10 @@ | ||
export default { | ||
testEnvironment: 'jsdom', | ||
testPathIgnorePatterns: ['/node_modules/', '/.next/'], | ||
collectCoverage: true, | ||
collectCoverageFrom: ['src/**/*.ts(x)'], | ||
setupFilesAfterEnv: ['<rootDir>/.jest/setup.ts'], | ||
transform: { | ||
'^.+\\.tsx?$': 'ts-jest', | ||
}, | ||
}; |
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,63 @@ | ||
{ | ||
"name": "vite-react-main-boilerplate", | ||
"private": true, | ||
"version": "0.0.0", | ||
"type": "module", | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "tsc && vite build", | ||
"preview": "vite preview", | ||
"lint": "eslint src --max-warnings=0", | ||
"test": "jest", | ||
"test:watch": "yarn test --watch", | ||
"prepare": "husky install", | ||
"generate": "yarn plop --plopfile ./generators/plopfile.js", | ||
"storybook": "start-storybook -p 6006", | ||
"build-storybook": "build-storybook" | ||
}, | ||
"dependencies": { | ||
"beautiful-react-hooks": "^3.11.1", | ||
"radash": "^7.1.0", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"react-router-dom": "^6.3.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.18.10", | ||
"@storybook/addon-actions": "^6.5.10", | ||
"@storybook/addon-essentials": "^6.5.10", | ||
"@storybook/addon-interactions": "^6.5.12", | ||
"@storybook/addon-links": "^6.5.10", | ||
"@storybook/builder-vite": "^0.2.2", | ||
"@storybook/react": "^6.5.10", | ||
"@storybook/testing-library": "^0.0.13", | ||
"@testing-library/jest-dom": "^5.16.5", | ||
"@testing-library/react": "^13.3.0", | ||
"@types/jest": "^28.1.7", | ||
"@types/react": "^18.0.17", | ||
"@types/react-dom": "^18.0.6", | ||
"@typescript-eslint/eslint-plugin": "^5.33.0", | ||
"@typescript-eslint/parser": "^5.33.0", | ||
"@vitejs/plugin-react": "^2.0.1", | ||
"autoprefixer": "^10.4.12", | ||
"babel-loader": "^8.2.5", | ||
"eslint": "8.21.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
"eslint-plugin-react": "^7.30.1", | ||
"eslint-plugin-react-hooks": "^4.6.0", | ||
"eslint-plugin-storybook": "^0.6.4", | ||
"husky": "^8.0.0", | ||
"jest": "^28.1.3", | ||
"jest-environment-jsdom": "^28.1.3", | ||
"plop": "^3.1.1", | ||
"postcss": "^8.4.16", | ||
"prettier": "2.7.1", | ||
"tailwindcss": "^3.1.8", | ||
"ts-jest": "^28.0.8", | ||
"ts-node": "^10.9.1", | ||
"typescript": "^4.6.4", | ||
"vite": "^3.0.7", | ||
"vite-tsconfig-paths": "^3.5.0" | ||
} | ||
} |
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,6 @@ | ||
module.exports = { | ||
plugins: { | ||
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,83 @@ | ||
@font-face { | ||
font-family: 'Roboto'; | ||
src: url('../fonts/Roboto-Thin.ttf') format('truetype'); | ||
font-weight: 100; | ||
font-style: normal; | ||
} | ||
|
||
@font-face { | ||
font-family: 'Roboto'; | ||
src: url('../fonts/Roboto-ThinItalic.ttf') format('truetype'); | ||
font-weight: 100; | ||
font-style: italic; | ||
} | ||
|
||
@font-face { | ||
font-family: 'Roboto'; | ||
src: url('../fonts/Roboto-Light.ttf') format('truetype'); | ||
font-weight: 300; | ||
font-style: normal; | ||
} | ||
|
||
@font-face { | ||
font-family: 'Roboto'; | ||
src: url('../fonts/Roboto-LightItalic.ttf') format('truetype'); | ||
font-weight: 300; | ||
font-style: italic; | ||
} | ||
|
||
@font-face { | ||
font-family: 'Roboto'; | ||
src: url('../fonts/Roboto-Regular.ttf') format('truetype'); | ||
font-weight: 400; | ||
font-style: normal; | ||
} | ||
|
||
@font-face { | ||
font-family: 'Roboto'; | ||
src: url('../fonts/Roboto-Italic.ttf') format('truetype'); | ||
font-weight: 400; | ||
font-style: italic; | ||
} | ||
|
||
@font-face { | ||
font-family: 'Roboto'; | ||
src: url('../fonts/Roboto-Medium.ttf') format('truetype'); | ||
font-weight: 500; | ||
font-style: normal; | ||
} | ||
|
||
@font-face { | ||
font-family: 'Roboto'; | ||
src: url('../fonts/Roboto-MediumItalic.ttf') format('truetype'); | ||
font-weight: 500; | ||
font-style: italic; | ||
} | ||
|
||
@font-face { | ||
font-family: 'Roboto'; | ||
src: url('../fonts/Roboto-Bold.ttf') format('truetype'); | ||
font-weight: 700; | ||
font-style: normal; | ||
} | ||
|
||
@font-face { | ||
font-family: 'Roboto'; | ||
src: url('../fonts/Roboto-BoldItalic.ttf') format('truetype'); | ||
font-weight: 700; | ||
font-style: italic; | ||
} | ||
|
||
@font-face { | ||
font-family: 'Roboto'; | ||
src: url('../fonts/Roboto-Black.ttf') format('truetype'); | ||
font-weight: 900; | ||
font-style: normal; | ||
} | ||
|
||
@font-face { | ||
font-family: 'Roboto'; | ||
src: url('../fonts/Roboto-BlackItalic.ttf') format('truetype'); | ||
font-weight: 900; | ||
font-style: italic; | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 @@ | ||
Vite React Main Boilerplate using Typescript + Tailwind CSS. |
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,5 @@ | ||
import Routes from './routes'; | ||
|
||
export default function App() { | ||
return <Routes />; | ||
} |
Oops, something went wrong.