-
Notifications
You must be signed in to change notification settings - Fork 2
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
0 parents
commit c562481
Showing
44 changed files
with
12,193 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 @@ | ||
{ "presets": ["next/babel"] } |
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,2 @@ | ||
node_modules | ||
__generated__ |
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,25 @@ | ||
{ | ||
"root": true, | ||
"parser": "@typescript-eslint/parser", | ||
"plugins": ["@typescript-eslint"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.js"], | ||
"rules": { | ||
"@typescript-eslint/no-var-requires": "off" | ||
} | ||
} | ||
], | ||
"env": { | ||
"node": true, | ||
"browser": true, | ||
"amd": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/eslint-recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"prettier/@typescript-eslint", | ||
"plugin:prettier/recommended" | ||
] | ||
} |
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 @@ | ||
* text=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,51 @@ | ||
name: ci | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
pull_request: | ||
branches: | ||
- main | ||
- master | ||
|
||
jobs: | ||
ci: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
node: [14] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
|
||
- name: Setup node env | ||
uses: actions/[email protected] | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
- name: Cache node_modules | ||
uses: actions/cache@v2 | ||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Install dependencies | ||
run: yarn | ||
|
||
- name: Run lint | ||
run: yarn lint | ||
|
||
- name: Run tests | ||
run: 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,8 @@ | ||
# npm | ||
node_modules | ||
# next.js build files | ||
.next | ||
# environment variables | ||
.env | ||
.env.* | ||
!.env.example |
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 @@ | ||
node_modules | ||
__generated__ | ||
.next | ||
storybook-static |
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 @@ | ||
{ | ||
"semi": true, | ||
"trailingComma": "all", | ||
"singleQuote": false, | ||
"printWidth": 80, | ||
"tabWidth": 4 | ||
} |
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,15 @@ | ||
module.exports = { | ||
stories: [ | ||
"../src/**/*.stories.mdx", | ||
"../src/**/*.stories.@(js|jsx|ts|tsx)", | ||
], | ||
addons: [ | ||
"@storybook/addon-links", | ||
"@storybook/addon-essentials", | ||
"@storybook/addon-controls", | ||
"@storybook/addon-knobs", | ||
], | ||
webpackFinal: async (config) => { | ||
return config; | ||
}, | ||
}; |
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,3 @@ | ||
export const parameters = { | ||
actions: { argTypesRegex: "^on[A-Z].*" }, | ||
}; |
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,19 @@ | ||
The MIT License (MIT) | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
n | ||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
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,115 @@ | ||
# owf | ||
|
||
|
||
This project was generated with [superplate](https://github.com/pankod/superplate). | ||
|
||
## Getting Started | ||
|
||
superplate is a Next.js all-in-one project generator. Create your project with the tools you need without spending hours on setting them up. | ||
|
||
## Available Scripts | ||
|
||
### Running the development server. | ||
|
||
```bash | ||
yarn dev | ||
``` | ||
|
||
### Building for production. | ||
|
||
```bash | ||
yarn build | ||
``` | ||
|
||
### Running the production server. | ||
|
||
```bash | ||
yarn start | ||
``` | ||
|
||
## Learn More | ||
|
||
To learn more about **superplate**, please check out the [Documentation](https://github.com/pankod/superplate). | ||
|
||
|
||
### **TailwindCSS** | ||
|
||
A utility-first CSS framework packed with classes like flex, pt-4, text-center and rotate-90 that can be composed to build any design, directly in your markup. | ||
|
||
[Go To Documentation](https://tailwindcss.com/docs) | ||
|
||
|
||
### **CSS / styled-jsx** | ||
|
||
Next.js comes with built-in support for CSS and styled-jsx. Styled-jsx is full, scoped and component-friendly CSS support for JSX (rendered on the server or the client). | ||
|
||
[Go To Documentation](https://github.com/vercel/styled-jsx) | ||
|
||
|
||
### **Fetch** | ||
|
||
Next.js has a built-in polyfill for the fetch API. You don't need to worry about using it on either server or client side. | ||
|
||
[Go To Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) | ||
|
||
|
||
### **Axios** | ||
|
||
Promise based HTTP client for the browser and node.js. | ||
|
||
[Go To Documentation](https://github.com/axios/axios) | ||
|
||
|
||
### **Storybook** | ||
|
||
Storybook is an open source tool for developing UI components in isolation for React, Vue, Angular, and more. It makes building stunning UIs organized and efficient. | ||
|
||
[Go To Documentation](https://storybook.js.org/docs/react/get-started/introduction) | ||
|
||
|
||
### **Environment Variables** | ||
|
||
Use environment variables in your next.js project for server side, client or both. | ||
|
||
[Go To Documentation](https://github.com/vercel/next.js/tree/canary/examples/environment-variables) | ||
|
||
|
||
### **SWR** | ||
|
||
React Hooks library for data fetching from Vercel | ||
|
||
[Go To Documentation](https://swr.vercel.app/) | ||
|
||
|
||
### **ESLint** | ||
|
||
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease. | ||
|
||
[Go To Documentation](https://eslint.org/docs/user-guide/getting-started) | ||
|
||
|
||
### **Prettier** | ||
|
||
An opinionated code formatter; Supports many languages; Integrates with most editors. | ||
|
||
[Go To Documentation](https://prettier.io/docs/en/index.html) | ||
|
||
|
||
### **lint-staged** | ||
|
||
The concept of lint-staged is to run configured linter (or other) tasks on files that are staged in git. | ||
|
||
[Go To Documentation](https://github.com/okonet/lint-staged) | ||
|
||
|
||
### **Github Actions** | ||
|
||
GitHub Actions makes it easy to automate all your software workflows, now with world-class CI/CD. Build, test, and deploy your code right from GitHub. | ||
|
||
[Go To Documentation](https://docs.github.com/en/actions) | ||
|
||
|
||
|
||
## License | ||
|
||
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/// <reference types="next" /> | ||
/// <reference types="next/types/global" /> |
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,3 @@ | ||
const withPlugins = require("next-compose-plugins"); | ||
|
||
module.exports = withPlugins([], {}); |
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,59 @@ | ||
{ | ||
"name": "owf", | ||
"version": "0.1.0", | ||
"private": true, | ||
"scripts": { | ||
"dev": "next dev", | ||
"build": "next build", | ||
"start": "next start", | ||
"storybook": "start-storybook -p 6006", | ||
"build-storybook": "build-storybook", | ||
"lint": "eslint '**/*.{js,jsx,ts,tsx}'", | ||
"prettier": "prettier --write '**/*.{js,jsx,ts,tsx}'" | ||
}, | ||
"dependencies": { | ||
"next": "10.2.0", | ||
"react": "17.0.2", | ||
"react-dom": "17.0.2", | ||
"next-compose-plugins": "^2.2.1", | ||
"axios": "^0.21.1", | ||
"swr": "^0.4.0", | ||
"prettier": "^2.2.1" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^14.14.13", | ||
"@types/react": "^17.0.0", | ||
"@types/react-dom": "^17.0.0", | ||
"typescript": "^4.1.3", | ||
"autoprefixer": "^10.1.0", | ||
"tailwindcss": "^2.0.2", | ||
"postcss": "^8.2.4", | ||
"css-loader": "^5.0.1", | ||
"@babel/core": "^7.12.10", | ||
"@storybook/addon-actions": "^6.1.14", | ||
"@storybook/addon-essentials": "^6.1.14", | ||
"@storybook/addon-links": "^6.1.14", | ||
"@storybook/preset-scss": "^1.0.3", | ||
"@storybook/addon-knobs": "^6.1.14", | ||
"@storybook/react": "^6.1.14", | ||
"babel-loader": "^8.2.2", | ||
"style-loader": "^2.0.0", | ||
"eslint": "^7.15.0", | ||
"@typescript-eslint/eslint-plugin": "^4.9.1", | ||
"@typescript-eslint/parser": "^4.9.1", | ||
"eslint-config-prettier": "^7.0.0", | ||
"eslint-plugin-prettier": "^3.2.0", | ||
"husky": "^4.3.7", | ||
"lint-staged": "^10.5.3" | ||
}, | ||
"lint-staged": { | ||
"*.{js,jsx,ts,tsx}": [ | ||
"npm run lint -- --quiet --fix" | ||
] | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "lint-staged" | ||
} | ||
} | ||
} |
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 React from "react"; | ||
import { AppProps } from "next/app"; | ||
import "tailwindcss/tailwind.css"; | ||
import "@styles/global.css"; | ||
|
||
function MyApp({ Component, pageProps }: AppProps): JSX.Element { | ||
return <Component {...pageProps} />; | ||
} | ||
|
||
export default MyApp; |
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 Document, { DocumentContext, DocumentInitialProps } from "next/document"; | ||
|
||
class CustomDocument extends Document { | ||
static async getInitialProps( | ||
ctx: DocumentContext, | ||
): Promise<DocumentInitialProps> { | ||
const initialProps = await Document.getInitialProps(ctx); | ||
|
||
return initialProps; | ||
} | ||
} | ||
|
||
export default CustomDocument; |
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,16 @@ | ||
import React from "react"; | ||
|
||
import { Container, Header, Main, Footer, Cards } from "@components"; | ||
|
||
const Home: React.FC = () => { | ||
return ( | ||
<Container> | ||
<Header /> | ||
<Main /> | ||
<Cards /> | ||
<Footer /> | ||
</Container> | ||
); | ||
}; | ||
|
||
export default Home; |
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: {}, | ||
}, | ||
}; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.