Skip to content

Commit 6893062

Browse files
authored
Merge pull request #9 from weaponsforge/feature/weaponsforge-1
Feature/weaponsforge 1
2 parents 53f38e8 + afead47 commit 6893062

File tree

21 files changed

+4025
-0
lines changed

21 files changed

+4025
-0
lines changed

.github/workflows/lint.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Lint Files
2+
3+
# This workflow lints the client and server directories
4+
# And will trigger on push *any* branch
5+
on:
6+
push:
7+
branches-ignore:
8+
- master
9+
- dev
10+
11+
jobs:
12+
lint-client:
13+
name: Lint Client
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout the repository
17+
uses: actions/checkout@v3
18+
19+
- name: Use NodeJS v18.14.2
20+
uses: actions/setup-node@v3
21+
with:
22+
node-version: 18.14.2
23+
24+
- name: Install Dependencies and Lint
25+
run: |
26+
cd client
27+
npm install
28+
npm run lint

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,30 @@
22

33
A React (NextJS) playground for testing using react hooks.
44

5+
## Requirements
6+
7+
The following dependecies are used for this project. Feel free to experiment using other dependencies and versions.
8+
9+
1. Windows 64-bit OS
10+
2. nvm version 1.1.9 (for Windows)
11+
- NOTE: Using nvm is optional if you want to continue using your pre-installed NodeJS.
12+
3. NodeJS LTS v18.14.2 installed using nvm
13+
- node v18.14.2
14+
- npm v9.5.0
15+
- > **NOTE:** We will use v18.14.2 for the official production client and server builds but feel free to use other NodeJS versions by setting "engine-strict=false" in the .npmrc file when working on localhost development as needed, but please use v18.14.2 when installing new modules. Do not commit the package.json or package-lock.json files should they change when "engine-strict=false".
16+
17+
### Core Libraries and Frameworks
18+
19+
- Client app
20+
- NextJS 13.2.4
21+
- React 18.2.0
22+
23+
## Installation
24+
25+
1. Clone this repository.<br>
26+
`https://github.com/weaponsforge/react-hooks-playground.git`
27+
28+
2. Follow the instructions on the README files inside the `/client` directory for more information on configuring and using the NextJS client app.
29+
530
@weaponsforge<br>
631
20230319

client/.eslintrc.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"env": {
3+
"node": true,
4+
"browser": true,
5+
"es6": true
6+
},
7+
"extends": "next/core-web-vitals",
8+
"plugins": [
9+
"eslint-plugin-react", "eslint-plugin-react-hooks"
10+
],
11+
"rules": {
12+
"indent": ["error", 2],
13+
"linebreak-style": ["error", "unix"],
14+
"quotes": ["error", "single"],
15+
"semi": ["error", "never"],
16+
"no-unused-vars": "error",
17+
"no-undef": "error",
18+
"no-trailing-spaces": "error",
19+
"no-console": ["error", { "allow": ["error"] }]
20+
}
21+
}

client/.gitignore

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# next.js
12+
/.next/
13+
/out/
14+
15+
# production
16+
/build
17+
18+
# misc
19+
.DS_Store
20+
*.pem
21+
22+
# debug
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*
26+
.pnpm-debug.log*
27+
28+
# local env files
29+
.env*.local
30+
31+
# vercel
32+
.vercel

client/.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
engine-strict=true

client/.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
18.14.2

client/README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
## react-hooks-playground/client
2+
3+
A React (NextJS) playground for testing using react hooks.
4+
5+
## Requirements
6+
7+
The following dependecies are used for this project. Feel free to experiment using other dependencies and versions.
8+
9+
1. Windows 64-bit OS
10+
2. nvm version 1.1.9 (for Windows)
11+
- NOTE: Using nvm is optional if you want to continue using your pre-installed NodeJS.
12+
3. NodeJS LTS v18.14.2 installed using nvm
13+
- node v18.14.2
14+
- npm v9.5.0
15+
- > **NOTE:** We will use v18.14.2 for the official production client and server builds but feel free to use other NodeJS versions by setting "engine-strict=false" in the .npmrc file when working on localhost development as needed, but please use v18.14.2 when installing new modules. Do not commit the package.json or package-lock.json files should they change when "engine-strict=false".
16+
17+
### Core Libraries and Frameworks
18+
19+
- Client app
20+
- NextJS 13.2.4
21+
- React 18.2.0
22+
23+
## Installation
24+
25+
1. Clone this repository.<br>
26+
`https://github.com/weaponsforge/react-hooks-playground.git`
27+
28+
## Available Scripts
29+
30+
### `npm run dev`
31+
Run the project in development mode. Launch the development website from:<br>
32+
http://localhost:3000
33+
34+
### `npm run lint`
35+
Check for lint errors.
36+
37+
### `npm run export`
38+
Export the static website.
39+
40+
### `npm start`
41+
Load the static website built from npm run export (no hot reloads). View the built website on:<br>
42+
http://localhost:3000
43+
44+
@weaponsforge<br>
45+
20230319

client/jsconfig.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"compilerOptions": {
3+
"paths": {
4+
"@/*": ["./src/*"]
5+
}
6+
}
7+
}

client/next.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/** @type {import('next').NextConfig} */
2+
const nextConfig = {
3+
reactStrictMode: true,
4+
}
5+
6+
module.exports = nextConfig

0 commit comments

Comments
 (0)