Skip to content

Commit 4ad6ecf

Browse files
committed
feat: setup automation for rea
dme
1 parent c399fe5 commit 4ad6ecf

26 files changed

+676
-325
lines changed

.vscode/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"spellright.language": ["en"],
3+
"spellright.documentTypes": ["latex", "plaintext"]
4+
}

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ If you are using `coc-snippets`, you can simply run the following command -
4646

4747
# Usage
4848

49-
All the snippets and using guide is given in the [USING Guide](./packages/vscode/README.md)
49+
All the snippets and using guide is given in the [USING Guide](./src/extension/README.md)
5050

5151
# Show your support
5252

@@ -57,7 +57,6 @@ Give a ⭐️ if this project helped you!
5757
Copyright © 2022 [Avneesh Agarwal](https://github.com/avneesh0612).<br />
5858
This project is [GNU](https://github.com/avneesh0612/react-nextjs-snippets/blob/main/LICENSE) licensed.
5959

60-
6160
## 🦸‍♂️ Authors
6261

6362
### Anurag

SNIPPETS.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Usage Guide
2+
3+
# Installation
4+
5+
- Install the VSCode extension
6+
- Reload VSCode
7+
- Snippets are ready 🎉
8+
9+
# 🌈 Table of Snippets
10+
11+
React and Next.js Snippets currently has a total of 38 snippets.
12+
13+
| Prefix | Description | Language |
14+
| -------- | ------------------------------------------------ | ---------- |
15+
| `rimr` | JavaScript: Import React | JavaScript |
16+
| `rimrd` | JavaScript: Import ReactDOM | JavaScript |
17+
| `rimrs` | JavaScript: Import React and useState | JavaScript |
18+
| `rimrse` | JavaScript: Import React, useState and useEffect | JavaScript |
19+
| `rfc` | JavaScript: React functional component | JavaScript |
20+
| `rue` | JavaScript: useEffect hook | JavaScript |
21+
| `rum` | JavaScript: useMemo hook | JavaScript |
22+
| `rus` | JavaScript: useState hook | JavaScript |
23+
| `ruc` | JavaScript: useContext hook | JavaScript |
24+
| `rucb` | JavaScript: useCallback hook | JavaScript |
25+
| `rur` | JavaScript: useRef hook | JavaScript |
26+
| `ngsst` | Typescript: Next.js get server side props | Typescript |
27+
| `ngsp` | TypeScript: Next.js get static props | TypeScript |
28+
| `npt` | Typescript: Next.js page | Typescript |
29+
| `ngipt` | TypeScript: Next.js get initial props | TypeScript |
30+
| `nct` | Typescript: Next.js component | Typescript |
31+
| `ngspat` | Typescript: Next.js get static path | Typescript |
32+
| `ncappt` | Typescript: Next.js custom app | Typescript |
33+
| `ncdoct` | Typescript: Next.js custom document | Typescript |
34+
| `ngapit` | Typescript: Next.js API Route | Typescript |
35+
| `ngss` | JavaScript: Next.js get server side props | JavaScript |
36+
| `ngsp` | JavaScript: Next.js get static props | JavaScript |
37+
| `ngspa` | JavaScript: Next.js get static path | JavaScript |
38+
| `ncapp` | JavaScript: Next.js custom app | JavaScript |
39+
| `ncdoc` | JavaScript: Next.js custom document | JavaScript |
40+
| `ngapi` | Javascript: Next.js API Route | Javascript |
41+
| `rimr` | TypeScript: import react | TypeScript |
42+
| `rimrd` | TypeScript: import React DOM | TypeScript |
43+
| `rimrs` | Typescript: Import React and useState | Typescript |
44+
| `rimrse` | Typescript: Import React, useState and useEffect | Typescript |
45+
| `rfct` | Typescript: React functional component | Typescript |
46+
| `ruet` | TypeScript: useEffect hook | TypeScript |
47+
| `rumt` | Typescript: useMemo hook | Typescript |
48+
| `rust` | TypeScript: useState hook | TypeScript |
49+
| `ruct` | TypeScript: useContext hook | TypeScript |
50+
| `rucbt` | TypeScript: useCallback hook | TypeScript |
51+
| `rurt` | TypeScript: useRef hook | TypeScript |
52+
53+
## ⭐ Show your support
54+
55+
Give a ⭐️ if this project helped you!
56+
57+
## 📝 License
58+
59+
Copyright © 2022 [Avneesh Agarwal](https://github.com/avneesh0612).<br />
60+
This project is [GNU](https://github.com/buidler-hub/react-nextjs-snippets/blob/main/LICENSE) licensed.

install.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
yarn install
2+
cd src/automation
3+
yarn install

package.json

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@
1717
"scripts": {
1818
"prepare": "husky install",
1919
"pre-commit": "yarn run format && git add -A .",
20-
"format": "prettier --write \"packages/vscode/{code,snippets}/**/*.{js,jsx,ts,tsx,json,md}\"",
21-
"format:check": "prettier --check \"packages/vscode/{code,snippets}/**/*.{js,jsx,ts,tsx,json,md}\""
20+
"format": "prettier --write .",
21+
"format:check": "prettier --check .",
22+
"generateReadme": "node ./src/automation/scripts/generateReadme.js"
2223
},
2324
"engines": {
2425
"vscode": "^1.64.0"
@@ -27,36 +28,36 @@
2728
"snippets": [
2829
{
2930
"language": "javascript",
30-
"path": "./packages/vscode/snippets/react-javascript.json"
31+
"path": "./src/extension/snippets/react-javascript.json"
3132
},
3233
{
3334
"language": "javascriptreact",
34-
"path": "./packages/vscode/snippets/react-javascript.json"
35+
"path": "./src/extension/snippets/react-javascript.json"
3536
},
3637
{
3738
"language": "typescript",
38-
"path": "./packages/vscode/snippets/react-typescript.json"
39+
"path": "./src/extension/snippets/react-typescript.json"
3940
},
4041
{
4142
"language": "typescriptreact",
42-
"path": "./packages/vscode/snippets/react-typescript.json"
43+
"path": "./src/extension/snippets/react-typescript.json"
4344
},
4445
{
4546
"language": "javascriptreact",
46-
"path": "./packages/vscode/snippets/next-javascript.json"
47+
"path": "./src/extension/snippets/next-javascript.json"
4748
},
4849
{
4950
"language": "typescript",
50-
"path": "./packages/vscode/snippets/next-typescript.json"
51+
"path": "./src/extension/snippets/next-typescript.json"
5152
},
5253
{
5354
"language": "typescriptreact",
54-
"path": "./packages/vscode/snippets/next-typescript.json"
55+
"path": "./src/extension/snippets/next-typescript.json"
5556
},
5657
{
5758
"language": "javascript",
58-
"path": "./packages/vscode/snippets/next-javascript.json"
59+
"path": "./src/extension/snippets/next-javascript.json"
5960
}
6061
]
6162
}
62-
}
63+
}

0 commit comments

Comments
 (0)