Skip to content

Commit 0391c6b

Browse files
committed
chore: change the folder str, steps toward monorepo
1 parent 41ec97f commit 0391c6b

24 files changed

+355
-207
lines changed

.github/workflows/commitlint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ jobs:
88
- uses: actions/checkout@v2
99
with:
1010
fetch-depth: 0
11-
- uses: wagoid/commitlint-github-action@v4
11+
- uses: wagoid/commitlint-github-action@v4

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ jobs:
2525
with:
2626
tag_name: ${{ steps.changelog.outputs.tag }}
2727
release_name: ${{ steps.changelog.outputs.tag }}
28-
body: ${{ steps.changelog.outputs.clean_changelog }}
28+
body: ${{ steps.changelog.outputs.clean_changelog }}

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
node_modules
2-
*.vsix

.husky/pre-commit

100644100755
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/sh
22
. "$(dirname "$0")/_/husky.sh"
33

4-
yarn run pre-commit
4+
npx pretty-quick --staged

.prettierignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*/node_modules
2+
*/husky

.prettierrc.json

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

CHANGELOG.md

+5-21
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,29 @@
11
## [1.2.1](https://github.com/avneesh0612/react-nextjs-snippets/compare/v1.2.0...v1.2.1) (2022-02-14)
22

3-
43
### Bug Fixes
54

6-
* use png instead of svg as vscode marketplace doesn't support png ([40c39a6](https://github.com/avneesh0612/react-nextjs-snippets/commit/40c39a6e4d3c08fe8a6f24fc857ffdd93eafd383))
7-
8-
5+
- use png instead of svg as vscode marketplace doesn't support png ([40c39a6](https://github.com/avneesh0612/react-nextjs-snippets/commit/40c39a6e4d3c08fe8a6f24fc857ffdd93eafd383))
96

107
# [1.2.0](https://github.com/avneesh0612/react-nextjs-snippets/compare/v1.1.1...v1.2.0) (2022-02-14)
118

12-
139
### Features
1410

15-
* add ProductHunt embed in Readme ([c42e2b7](https://github.com/avneesh0612/react-nextjs-snippets/commit/c42e2b716a2c5d034636eae6727631378daea01b))
16-
17-
11+
- add ProductHunt embed in Readme ([c42e2b7](https://github.com/avneesh0612/react-nextjs-snippets/commit/c42e2b716a2c5d034636eae6727631378daea01b))
1812

1913
## [1.1.1](https://github.com/avneesh0612/react-nextjs-snippets/compare/v1.1.0...v1.1.1) (2022-02-13)
2014

21-
2215
### Bug Fixes
2316

24-
* update name everywhere ([e1d287d](https://github.com/avneesh0612/react-nextjs-snippets/commit/e1d287da4dc55304d9d805e3e002574c92109c74))
25-
26-
17+
- update name everywhere ([e1d287d](https://github.com/avneesh0612/react-nextjs-snippets/commit/e1d287da4dc55304d9d805e3e002574c92109c74))
2718

2819
# [1.1.0](https://github.com/avneesh0612/react-nextjs-snippets/compare/v0.6.1...v1.1.0) (2022-02-13)
2920

30-
3121
### Features
3222

33-
* release v1 ([2ebe60a](https://github.com/avneesh0612/react-nextjs-snippets/commit/2ebe60a3dbc0a7d985756f69404a90456d761d5c))
34-
35-
23+
- release v1 ([2ebe60a](https://github.com/avneesh0612/react-nextjs-snippets/commit/2ebe60a3dbc0a7d985756f69404a90456d761d5c))
3624

3725
## [0.6.1](https://github.com/avneesh0612/react-nextjs-snippets/compare/v0.5.0...v0.6.1) (2022-02-13)
3826

39-
4027
### Bug Fixes
4128

42-
* icon ([f115134](https://github.com/avneesh0612/react-nextjs-snippets/commit/f11513440b1d89b32d555d5defecec3494c44cd2))
43-
44-
45-
29+
- icon ([f115134](https://github.com/avneesh0612/react-nextjs-snippets/commit/f11513440b1d89b32d555d5defecec3494c44cd2))

CODE_OF_CONDUCT.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
1717
Examples of behavior that contributes to a positive environment for our
1818
community include:
1919

20-
* Demonstrating empathy and kindness toward other people
21-
* Being respectful of differing opinions, viewpoints, and experiences
22-
* Giving and gracefully accepting constructive feedback
23-
* Accepting responsibility and apologizing to those affected by our mistakes,
20+
- Demonstrating empathy and kindness toward other people
21+
- Being respectful of differing opinions, viewpoints, and experiences
22+
- Giving and gracefully accepting constructive feedback
23+
- Accepting responsibility and apologizing to those affected by our mistakes,
2424
and learning from the experience
25-
* Focusing on what is best not just for us as individuals, but for the
25+
- Focusing on what is best not just for us as individuals, but for the
2626
overall community
2727

2828
Examples of unacceptable behavior include:
2929

30-
* The use of sexualized language or imagery, and sexual attention or
30+
- The use of sexualized language or imagery, and sexual attention or
3131
advances of any kind
32-
* Trolling, insulting or derogatory comments, and personal or political attacks
33-
* Public or private harassment
34-
* Publishing others' private information, such as a physical or email
32+
- Trolling, insulting or derogatory comments, and personal or political attacks
33+
- Public or private harassment
34+
- Publishing others' private information, such as a physical or email
3535
address, without their explicit permission
36-
* Other conduct which could reasonably be considered inappropriate in a
36+
- Other conduct which could reasonably be considered inappropriate in a
3737
professional setting
3838

3939
## Enforcement Responsibilities
@@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban.
106106
### 4. Permanent Ban
107107

108108
**Community Impact**: Demonstrating a pattern of violation of community
109-
standards, including sustained inappropriate behavior, harassment of an
109+
standards, including sustained inappropriate behavior, harassment of an
110110
individual, or aggression toward or disparagement of classes of individuals.
111111

112112
**Consequence**: A permanent ban from any sort of public interaction within

README.md

+17-18
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ React and Next.js Snippets with TypeScript support as well!🚀
77
<a href="https://www.producthunt.com/posts/react-and-next-js-snippets?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-react-and-next-js-snippets" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.png?post_id=331596&theme=dark" alt="React and Next.js Snippets - React and Next.js snippets with TypeScript | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>
88
<a href="https://www.producthunt.com/posts/react-and-next-js-snippets?utm_source=badge-top-post-badge&utm_medium=badge&utm_souce=badge-react-and-next-js-snippets" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/top-post-badge.png?post_id=331596&theme=dark&period=daily" alt="React and Next.js Snippets - React and Next.js snippets with TypeScript | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>
99

10-
1110
# Installation
1211

1312
- Install the VSCode extension
@@ -100,7 +99,7 @@ React and Next.js Snippets with TypeScript support as well!🚀
10099
1. `nssr` (Next.js Get Server Side Props)
101100

102101
```jsx
103-
export const getServerSideProps = async context => {
102+
export const getServerSideProps = async (context) => {
104103
return {
105104
props: {},
106105
};
@@ -110,7 +109,7 @@ React and Next.js Snippets with TypeScript support as well!🚀
110109
2. `nssg` (Next.js Get Static Props)
111110

112111
```jsx
113-
export const getStaticProps = async context => {
112+
export const getStaticProps = async (context) => {
114113
return {
115114
props: {},
116115
};
@@ -144,40 +143,40 @@ React and Next.js Snippets with TypeScript support as well!🚀
144143
145144
export default Document;
146145
```
147-
148-
5. `ngsp` (Next.js Get Static Path Javascript)
146+
147+
5. `ngsp` (Next.js Get Static Path Javascript)
149148

150149
```jsx
151150
export const getStaticPaths = async () => {
152151
return {
153152
paths:[${1}],
154153
fallback:false
155154
};
156-
};
157-
155+
};
156+
```
158157

159158
### TypeScript
160159

161160
1. `nssrt` (Next.js Get Server Side Props Typescript)
162161

163162
```tsx
164-
export const getServerSideProps: GetServerSideProps = async context => {
163+
export const getServerSideProps: GetServerSideProps = async (context) => {
165164
return { props: {} };
166165
};
167166
```
168167

169168
2. `nssgt` (Next.js Get Static Props Typescript)
170169

171170
```tsx
172-
export const getStaticProps: getStaticProps = async context => {
171+
export const getStaticProps: getStaticProps = async (context) => {
173172
return { props: {} };
174173
};
175174
```
176175

177176
3. `ngip` (Get Initial Props in Next.js)
178177

179178
```tsx
180-
Page.getInitialProps = async context => {
179+
Page.getInitialProps = async (context) => {
181180
return { props: {} };
182181
};
183182
```
@@ -234,11 +233,11 @@ React and Next.js Snippets with TypeScript support as well!🚀
234233

235234
8. `ngspt` (Next.js Get Static Path Typescript)
236235

237-
```tsx
238-
export const getStaticPaths: GetStaticPaths = async () => {
239-
return {
240-
paths:[${1}],
241-
fallback:false
242-
};
243-
}
244-
```
236+
```tsx
237+
export const getStaticPaths: GetStaticPaths = async () => {
238+
return {
239+
paths:[${1}],
240+
fallback:false
241+
};
242+
}
243+
```

commitlint.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
module.exports = {extends: ['@commitlint/config-conventional']}
1+
module.exports = { extends: ["@commitlint/config-conventional"] };

package.json

+14-46
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,23 @@
11
{
22
"name": "react-nextjs-snippets",
3-
"displayName": "React and Next.js Snippets",
4-
"description": "This is an extension for React and Next.js Snippets with ts support as well!",
5-
"version": "1.2.1",
6-
"publisher": "AvneeshAgarwal",
7-
"icon": "logo.png",
8-
"repository": {
9-
"url": "https://github.com/avneesh0612/react-nextjs-snippets"
3+
"version": "1.0.0",
4+
"main": "index.js",
5+
"repository": "https://github.com/kr-anurag/react-nextjs-snippets.git",
6+
"author": "Anurag <[email protected]>",
7+
"license": "MIT",
8+
"dependencies": {
9+
"@commitlint/cli": "^16.1.0",
10+
"@commitlint/config-conventional": "^16.0.0"
1011
},
11-
"engines": {
12-
"vscode": "^1.64.0"
12+
"devDependencies": {
13+
"husky": "^7.0.0",
14+
"prettier": "2.5.1",
15+
"pretty-quick": "^3.1.3"
1316
},
1417
"scripts": {
1518
"prepare": "husky install",
1619
"pre-commit": "yarn run format && git add -A .",
1720
"format": "prettier --write \"{code,snippets}/**/*.{js,jsx,ts,tsx,json,md}\"",
18-
"format:check": "prettier --check \"{code,snippets}/**/*.{js,jsx,ts,tsx,json,md}\"",
19-
"release": "standard-version",
20-
"release:minor": "standard-version --release-as minor",
21-
"release:patch": "standard-version --release-as patch",
22-
"release:major": "standard-version --release-as major"
23-
},
24-
"categories": [
25-
"Snippets"
26-
],
27-
"contributes": {
28-
"snippets": [
29-
{
30-
"language": "typescriptreact",
31-
"path": "./snippets/react-typescript.json"
32-
},
33-
{
34-
"language": "javascriptreact",
35-
"path": "./snippets/react-javascript.json"
36-
},
37-
{
38-
"language": "typescriptreact",
39-
"path": "./snippets/next-typescript.json"
40-
},
41-
{
42-
"language": "javascriptreact",
43-
"path": "./snippets/next-javascript.json"
44-
}
45-
]
46-
},
47-
"dependencies": {
48-
"@commitlint/cli": "^16.1.0",
49-
"@commitlint/config-conventional": "^16.0.0"
50-
},
51-
"devDependencies": {
52-
"husky": "^7.0.4",
53-
"prettier": "^2.5.1"
21+
"format:check": "prettier --check \"{code,snippets}/**/*.{js,jsx,ts,tsx,json,md}\""
5422
}
55-
}
23+
}
File renamed without changes.

packages/vscode/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
*.vsix
File renamed without changes.

.vscode/launch.json packages/vscode/.vscode/launch.json

+2-4
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
"name": "Extension",
66
"type": "extensionHost",
77
"request": "launch",
8-
"args": [
9-
"--extensionDevelopmentPath=${workspaceFolder}"
10-
]
8+
"args": ["--extensionDevelopmentPath=${workspaceFolder}"]
119
}
1210
]
13-
}
11+
}
File renamed without changes.

logo.png packages/vscode/logo.png

File renamed without changes.

packages/vscode/package.json

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"name": "react-nextjs-snippets",
3+
"displayName": "React and Next.js Snippets",
4+
"description": "This is an extension for React and Next.js Snippets with ts support as well!",
5+
"version": "1.2.1",
6+
"publisher": "AvneeshAgarwal",
7+
"icon": "logo.png",
8+
"repository": {
9+
"url": "https://github.com/avneesh0612/react-nextjs-snippets"
10+
},
11+
"engines": {
12+
"vscode": "^1.64.0"
13+
},
14+
"scripts": {
15+
"release": "standard-version",
16+
"release:minor": "standard-version --release-as minor",
17+
"release:patch": "standard-version --release-as patch",
18+
"release:major": "standard-version --release-as major"
19+
},
20+
"categories": [
21+
"Snippets"
22+
],
23+
"contributes": {
24+
"snippets": [
25+
{
26+
"language": "typescriptreact",
27+
"path": "./snippets/react-typescript.json"
28+
},
29+
{
30+
"language": "javascriptreact",
31+
"path": "./snippets/react-javascript.json"
32+
},
33+
{
34+
"language": "typescriptreact",
35+
"path": "./snippets/next-typescript.json"
36+
},
37+
{
38+
"language": "javascriptreact",
39+
"path": "./snippets/next-javascript.json"
40+
}
41+
]
42+
},
43+
"dependencies": {},
44+
"devDependencies": {}
45+
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

packages/vscode/yarn.lock

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2+
# yarn lockfile v1
3+
4+

0 commit comments

Comments
 (0)