/
package.json
116 lines (116 loc) · 3.92 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
{
"name": "automate-react",
"displayName": "Automate React Component",
"description": "This extension automates the process of creating boilerplate code while creating a react component.",
"version": "0.0.1",
"publisher": "zainsra",
"repository": {
"type": "git",
"url": "https://github.com/zainsra7/automate-react-component"
},
"icon": "images/icon.png",
"galleryBanner": {
"color": "#0094C8",
"theme": "dark"
},
"engines": {
"vscode": "^1.40.0"
},
"categories": [
"Programming Languages",
"Other",
"Snippets"
],
"keywords": [
"automate",
"react",
"react component",
"snippets"
],
"activationEvents": [
"onCommand:extension.createreactcomponent"
],
"main": "./out/extension.js",
"contributes": {
"commands": [
{
"command": "extension.createreactcomponent",
"title": "Create React Component"
}
],
"keybindings": [
{
"command": "extension.createreactcomponent",
"key": "ctrl+shift+r",
"mac": "cmd+shift+r"
}
],
"configuration": {
"title": "Automate React",
"properties": {
"automatereact.files": {
"type": "array",
"default": [
{
"fileName": "fn$.tsx",
"content": "import React from 'react';\r\nimport { Cn$Styles } from './fn$.styles';\r\n\r\ninterface Props {\r\n name: string;\r\n};\r\n\r\nexport const Cn$ = ({ name }: Props) => {\r\n const classes = Cn$Styles({});\r\n\r\n return(\r\n <>${name}</>\r\n );\r\n};\n"
},
{
"fileName": "fn$.styles.ts",
"content": "import { createStyles, makeStyles } from '@material-ui/core';\r\n\r\nexport const Cn$Styles = makeStyles(() => \r\n createStyles({\r\n root: {\r\n display: 'flex',\r\n },\r\n }),\r\n);\n"
},
{
"fileName": "fn$.test.tsx",
"content": "import React from 'react';\r\nimport 'jest-dom/extend-expect';\r\nimport { cN$Fixtures } from './fn$.fixtures';\r\nimport { Cn$ } from './fn$';\r\n\r\ndescribe('Cn$ Tests', async() => {\r\n it('component renders correctly', () => {\r\n const { getByTestId, findByText } = renderWithRouter(\r\n <MockProviders>\r\n <Cn$ name={cN$Fixtures.name}/>\r\n </MockProviders>\r\n );\r\n\texpect(cN$Fixtures.name).toBeInTheDocument();\r\n });\r\n});\n"
},
{
"fileName": "fn$.fixtures.ts",
"content": "export const cN$Fixtures = {\r\n\tname: 'Test Component',\r\n };\n"
},
{
"fileName": "index.ts",
"content": "export * from './fn$';\n"
}
],
"description": "Specify the skeleton code of files you want to create for your component. Please refer to the Readme for examples and valid format. You can use following link for escaping JSON string to use as file content:\n(https://www.freeformatter.com/json-escape.html)"
}
}
},
"snippets": [
{
"path": "./.code-snippets"
}
],
"menus": {
"explorer/context": [
{
"command": "extension.createreactcomponent",
"group": "2_workspace"
}
]
}
},
"scripts": {
"vscode:prepublish": "npm run compile",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"pretest": "npm run compile",
"test": "node ./out/test/runTest.js"
},
"devDependencies": {
"@types/glob": "^7.1.1",
"@types/mocha": "^5.2.7",
"@types/node": "^12.11.7",
"@types/vscode": "^1.40.0",
"glob": "^7.1.5",
"mocha": "^6.2.2",
"typescript": "^3.6.4",
"tslint": "^5.20.0",
"vscode-test": "^1.2.2"
},
"bugs": {
"url": "https://github.com/zainsra7/automate-react-component/issues",
"email": "m.zain.ul.islam@gmail.com"
},
"homepage": "https://github.com/zainsra7/automate-react-component/blob/master/README.md"
}