Skip to content

Commit f90f3dc

Browse files
committed
initialize React and Next.js Snippets
0 parents  commit f90f3dc

14 files changed

+231
-0
lines changed

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Set default behavior to automatically normalize line endings.
2+
* text=auto
3+

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
*.vsix

.vscode/launch.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Extension",
6+
"type": "extensionHost",
7+
"request": "launch",
8+
"args": ["--extensionDevelopmentPath=${workspaceFolder}"]
9+
}
10+
]
11+
}

.vscodeignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.vscode/**
2+
.vscode-test/**
3+
.gitignore
4+
vsc-extension-quickstart.md

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Change Log
2+
3+
All notable changes to the "Next.js and React Snippets" extension will be documented in this file.
4+
5+
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
6+
7+
## 0.0.1
8+
9+
- Initial release of Next.js and React Snippets

README.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Next.js and React Snippets README
2+
3+
This is the README for your extension "Next.js and React Snippets". After writing up a brief description, we recommend including the following sections.
4+
5+
## Features
6+
7+
Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file.
8+
9+
For example if there is an image subfolder under your extension project workspace:
10+
11+
\!\[feature X\]\(images/feature-x.png\)
12+
13+
> Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow.
14+
15+
## Requirements
16+
17+
If you have any requirements or dependencies, add a section describing those and how to install and configure them.
18+
19+
## Extension Settings
20+
21+
Include if your extension adds any VS Code settings through the `contributes.configuration` extension point.
22+
23+
For example:
24+
25+
This extension contributes the following settings:
26+
27+
- `myExtension.enable`: enable/disable this extension
28+
- `myExtension.thing`: set to `blah` to do something
29+
30+
## Known Issues
31+
32+
Calling out known issues can help limit users opening duplicate issues against your extension.
33+
34+
## Release Notes
35+
36+
Users appreciate release notes as you update your extension.
37+
38+
### 1.0.0
39+
40+
Initial release of ...
41+
42+
### 1.0.1
43+
44+
Fixed issue #.
45+
46+
### 1.1.0
47+
48+
Added features X, Y, and Z.
49+
50+
---
51+
52+
## Working with Markdown
53+
54+
**Note:** You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:
55+
56+
- Split the editor (`Cmd+\` on macOS or `Ctrl+\` on Windows and Linux)
57+
- Toggle preview (`Shift+CMD+V` on macOS or `Shift+Ctrl+V` on Windows and Linux)
58+
- Press `Ctrl+Space` (Windows, Linux) or `Cmd+Space` (macOS) to see a list of Markdown snippets
59+
60+
### For more information
61+
62+
- [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown)
63+
- [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/)
64+
65+
**Enjoy!**

abc.tsx

Whitespace-only changes.

package.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"name": "nextreactsnippets",
3+
"displayName": "Next.js and React Snippets",
4+
"description": "This is an extension for Next.js and React Snippets with ts support as well!",
5+
"version": "0.0.1",
6+
"engines": {
7+
"vscode": "^1.64.0"
8+
},
9+
"scripts": {
10+
"format": "prettier --write \"{components,code}/**/*.{js,jsx,ts,tsx}\"",
11+
"format:check": "prettier --check \"{components,code}/**/*.{js,jsx,ts,tsx}\""
12+
},
13+
"categories": [
14+
"Snippets"
15+
],
16+
"contributes": {
17+
"snippets": [
18+
{
19+
"language": "typescriptreact",
20+
"path": "./snippets/react-typescript.code-snippets"
21+
},
22+
{
23+
"language": "javascriptreact",
24+
"path": "./snippets/react-javascript.code-snippets"
25+
},
26+
{
27+
"language": "typescriptreact",
28+
"path": "./snippets/next-typescript.code-snippets"
29+
},
30+
{
31+
"language": "javascriptreact",
32+
"path": "./snippets/next-javascript.code-snippets"
33+
}
34+
]
35+
}
36+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"ssr": {
3+
"prefix": "nextssr",
4+
"body": [
5+
"export const getServerSideProps = async context => {",
6+
" return {",
7+
" props: {},",
8+
" };",
9+
"};",
10+
""
11+
],
12+
"description": "Get Server Side Props Next.js"
13+
},
14+
"ssg": {
15+
"prefix": "nextssg",
16+
"body": [
17+
"export const getStaticProps = async context => {",
18+
" return {",
19+
" props: {},",
20+
" };",
21+
"};",
22+
""
23+
],
24+
"description": "Get Static Props Next.js"
25+
}
26+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"ssrt": {
3+
"prefix": "nextssrt",
4+
"body": [
5+
"export const getServerSideProps: GetServerSideProps = async context => {",
6+
" return {",
7+
" props: {},",
8+
" };",
9+
"};",
10+
""
11+
],
12+
"description": "Get Server Side Props Next.js"
13+
},
14+
"ssgt": {
15+
"prefix": "nextssgt",
16+
"body": [
17+
"export const getStaticProps: getStaticProps = async context => {",
18+
" return {",
19+
" props: {},",
20+
" };",
21+
"};",
22+
""
23+
],
24+
"description": "Get Static Props Next.js"
25+
}
26+
}

0 commit comments

Comments
 (0)