Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite2e100a

Browse files
authored
Merge pull request#76 from ShMcK/feature/bundle
Package for sharing
2 parentsc8ebeb9 +fb41b4d commite2e100a

File tree

11 files changed

+144
-132
lines changed

11 files changed

+144
-132
lines changed

‎.vscodeignore

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,26 @@
1+
## Common
2+
.gitignore
3+
4+
## Docs
5+
DEV.md
6+
7+
## VSCode
18
.vscode/**
29
.vscode-test/**
310
vsc-extension-quickstart.md
4-
.gitignore
5-
build/test/**
11+
*.vsix
12+
13+
## Dev Folders
614
src/**
15+
web-app/**
16+
.env
17+
.prettierrc.js
18+
jest.config.js
19+
20+
## TypeScript
721
**/tsconfig.json
822
**/tslint.json
9-
**/*.map
1023
**/*.ts
11-
web-app/**
12-
typings/**
13-
*.vsix
24+
25+
## Tests
26+
build/test/**

‎DEV.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
#Setup
2+
3+
##Development
4+
5+
Run the postgres db and api server.
6+
7+
Setup the extension environmental variables.
8+
9+
/src/.env
10+
11+
```
12+
LOG=true #show hide debugging logs
13+
```
14+
15+
Setup the web app environmental variables.
16+
17+
/web-app/.env.local
18+
19+
```
20+
REACT_APP_DEBUG=true # show/hide web debugger
21+
REACT_APP_GQL_URI=http://localhost:4000/graphql
22+
```
23+
24+
Run`npm run build`. Press F5 to open a new development window.
25+
26+
Open the tutorial using`cmd+shift+p` on mac, and select the action`coderoad.start`.
27+
28+
##Supported Programming Languages
29+
30+
To support a new programming language, the test runner needs to support a format called TAP (https://testanything.org/).
31+
32+
Some test frameworks can be modified to use tap, see a list of TAP reporters:https://github.com/sindresorhus/awesome-tap#reporters.
33+
34+
###JavaScript
35+
36+
#####Jest
37+
38+
```json
39+
{
40+
"scripts": {
41+
"test":"jest"
42+
},
43+
"devDependencies": {
44+
"jest-tap-reporter":"1.9.0"
45+
},
46+
"jest": {
47+
"reporters": ["jest-tap-reporter"]
48+
}
49+
}
50+
```
51+
52+
##Install Extension Demo
53+
54+
1. Copy the`CodeRoad.vsix` file locally
55+
2. Select the extensions logo from the left hand panel
56+
3. In the top right of the panel, select the three dots “more” dropdown.
57+
1. Choose “Install from VSIX…”
58+
2. Select the`CodeRoad.vsix` file and press “Install”
59+
4. Reload the VSCode editor (Ctrl/Cmd + Shift + P, run "Reload Window")
60+
5. Open up a new folder directory in VSCode and run the extension`coderoad:start`
61+
62+
##Known Issues
63+
64+
There are no known issues at this time.

‎README.md

Lines changed: 3 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -12,66 +12,7 @@ Requires:
1212
- Git
1313
- Node 10+
1414

15-
##Development
15+
##Run
1616

17-
Run the postgres db and api server.
18-
19-
Setup the extension environmental variables.
20-
21-
/src/.env
22-
23-
```
24-
LOG=true #show hide debugging logs
25-
```
26-
27-
Setup the web app environmental variables.
28-
29-
/web-app/.env.local
30-
31-
```
32-
REACT_APP_DEBUG=true # show/hide web debugger
33-
REACT_APP_GQL_URI=http://localhost:4000/graphql
34-
REACT_APP_GQL_AUTH_TOKEN={YOUR_API_AUTH_TOKEN}
35-
```
36-
37-
Run`npm run build`. Press F5 to open a new development window.
38-
39-
Open the tutorial using`cmd+shift+p` on mac, and select the action`coderoad.start`.
40-
41-
##Extension Settings
42-
43-
Include if your extension adds any VS Code settings through the`contributes.configuration` extension point.
44-
45-
For example:
46-
47-
This extension contributes the following settings:
48-
49-
-`coderoad.start`: starts the extension
50-
51-
##Supported Programming Languages
52-
53-
To support a new programming language, the test runner needs to support a format called TAP (https://testanything.org/).
54-
55-
Some test frameworks can be modified to use tap, see a list of TAP reporters:https://github.com/sindresorhus/awesome-tap#reporters.
56-
57-
###JavaScript
58-
59-
#####Jest
60-
61-
```json
62-
{
63-
"scripts": {
64-
"test":"jest"
65-
},
66-
"devDependencies": {
67-
"jest-tap-reporter":"1.9.0"
68-
},
69-
"jest": {
70-
"reporters": ["jest-tap-reporter"]
71-
}
72-
}
73-
```
74-
75-
##Known Issues
76-
77-
There are no known issues at this time.
17+
1. Open the command prompt:`cmd/ctrl + shift + p`
18+
2. Search for and run`coderoad:start`

‎package-lock.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎package.json

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
},
1818
"main":"./build/extension.js",
1919
"scripts": {
20-
"build":"rm -rf build &&concurrently\"npm run build:ext\"\"npm run build:web\"",
21-
"build:ext":"npm run compile",
20+
"build":"rm -rf build && npm run build:ext &&npm run build:web",
21+
"build:ext":"tsc -p ./",
2222
"build:web":"cd web-app && npm run build",
23-
"compile":"tsc -p ./",
23+
"postbuild:web":"cp -R ./web-app/build/ ./build/",
2424
"postinstall":"node ./node_modules/vscode/bin/install",
2525
"lint":"eslint src/**/*ts",
2626
"machine":"node ./out/state/index.js",
@@ -31,28 +31,23 @@
3131
"watch":"tsc -watch -p ./"
3232
},
3333
"dependencies": {
34-
"@types/chokidar":"^2.1.3",
3534
"chokidar":"^3.3.0",
35+
"dotenv":"^8.2.0",
3636
"jsdom":"^15.2.1"
3737
},
3838
"devDependencies": {
3939
"@types/assert":"^1.4.3",
40+
"@types/chokidar":"^2.1.3",
4041
"@types/dotenv":"^8.2.0",
4142
"@types/glob":"^7.1.1",
4243
"@types/jest":"^24.0.25",
4344
"@types/jsdom":"^12.2.4",
4445
"@types/node":"^13.1.6",
4546
"@typescript-eslint/eslint-plugin":"^2.15.0",
4647
"@typescript-eslint/parser":"^2.15.0",
47-
"assert":"^2.0.0",
48-
"concurrently":"^5.0.1",
49-
"dotenv":"^8.2.0",
5048
"eslint":"^6.8.0",
5149
"eslint-config-prettier":"^6.9.0",
5250
"eslint-plugin-prettier":"^3.1.2",
53-
"glob":"^7.1.6",
54-
"graphql":"^14.5.8",
55-
"mocha":"^6.2.2",
5651
"prettier":"^1.19.1",
5752
"ts-jest":"^24.3.0",
5853
"typescript":"^3.7.4",

‎src/environment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ interface Environment {
77
}
88

99
constenvironment:Environment={
10-
LOG:(process.env.LOG||'').toLowerCase()==='test',
10+
LOG:(process.env.LOG||'').toLowerCase()==='true',
1111
}
1212

1313
exportdefaultenvironment

‎tsconfig.json

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,29 @@
11
{
2-
"compilerOptions": {
3-
"module":"commonjs",
4-
"target":"es2018",
5-
"outDir":"build",
6-
"lib": ["es2018","dom"],
7-
"sourceMap":true,
8-
"rootDir":"src",
9-
"baseUrl":"src",
10-
"strict":true/* enable all strict type-checking options*/,
11-
/* Additional Checks*/
12-
"forceConsistentCasingInFileNames":true,
13-
"noImplicitReturns":true,
14-
"noImplicitThis":true,
15-
"noImplicitAny":true,
16-
"strictNullChecks":true,
17-
"suppressImplicitAnyIndexErrors":true,
18-
"noUnusedLocals":false,
19-
"experimentalDecorators":true,
20-
"emitDecoratorMetadata":true,
21-
"paths": {
22-
"typings": ["../typings/index.d.ts"],
23-
"typings/graphql": ["../typings/graphql.d.ts"],
24-
"@api": ["services/api/index"],
25-
"@gql/*": ["services/api/gql/*"]
26-
},
27-
"allowJs":true
28-
},
29-
"exclude": ["node_modules",".vscode-test","build","resources","web-app","*.js","*.test.ts"]
2+
"compilerOptions": {
3+
"module":"commonjs",
4+
"target":"es2018",
5+
"outDir":"build",
6+
"lib": ["es2018","dom"],
7+
"sourceMap":true,
8+
"rootDir":"src",
9+
"baseUrl":"src",
10+
"strict":true/* enable all strict type-checking options*/,
11+
/* Additional Checks*/
12+
"forceConsistentCasingInFileNames":true,
13+
"noImplicitReturns":true,
14+
"noImplicitThis":true,
15+
"noImplicitAny":true,
16+
"strictNullChecks":true,
17+
"suppressImplicitAnyIndexErrors":true,
18+
"noUnusedLocals":false,
19+
"experimentalDecorators":true,
20+
"emitDecoratorMetadata":true,
21+
"paths": {
22+
"typings": ["../typings/index.d.ts"],
23+
"typings/graphql": ["../typings/graphql.d.ts"]
24+
},
25+
"allowJs":true,
26+
"removeComments":true
27+
},
28+
"exclude": ["node_modules",".vscode-test","build","resources","web-app","*.js","*.test.ts"]
3029
}

‎web-app/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"private":true,
55
"scripts": {
66
"build":"react-app-rewired build",
7-
"postbuild":"cp -R ./build/ ../build/",
87
"build-storybook":"build-storybook",
98
"start":"react-app-rewired start",
109
"storybook":"start-storybook -p 6006",

‎web-app/src/environment.ts

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
1-
interfaceEnvironment{
2-
GQL_URI:string
3-
DEBUG:boolean
4-
}
5-
61
// validate .env
7-
constrequiredKeys=['REACT_APP_GQL_URI']
8-
for(constrequiredofrequiredKeys){
9-
if(!process.env[required]){
10-
thrownewError(`Missing Environmental Variables:${required}`)
11-
}
12-
}
2+
//const requiredKeys = ['REACT_APP_GQL_URI']
3+
//for (const required of requiredKeys) {
4+
// if (!process.env[required]) {
5+
// throw new Error(`Missing Environmental Variables: ${required}`)
6+
// }
7+
//}
138

14-
exportconstGQL_URI=process.env.REACT_APP_GQL_URI||''
15-
exportconstDEBUG=(process.env.REACT_APP_DEBUG||'').toLowerCase()==='true'
9+
exportconstGQL_URI:string=process.env.REACT_APP_GQL_URI||'https://33mf420q4m.execute-api.us-west-2.amazonaws.com/stage/api-stage'
10+
exportconstDEBUG:boolean=(process.env.REACT_APP_DEBUG||'').toLowerCase()==='true'

‎web-app/tsconfig.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
{
22
"extends":"./tsconfig.paths.json",
33
"compilerOptions": {
4+
"rootDirs": [
5+
"src",
6+
"stories"
7+
],
8+
"baseUrl":"src",
9+
"outDir":"build",
410
"target":"es2018",
511
"lib": [
612
"dom",
@@ -18,7 +24,8 @@
1824
"resolveJsonModule":true,
1925
"isolatedModules":true,
2026
"noEmit":true,
21-
"jsx":"preserve"
27+
"jsx":"preserve",
28+
"sourceMap":true
2229
},
2330
"include": [
2431
"src"

‎web-app/tsconfig.paths.json

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
{
2-
"compilerOptions": {
3-
"baseUrl":"src",
4-
"rootDirs": ["src","stories"],
5-
"paths": {
6-
"typings": ["../../typings/index.d.ts"],
7-
"typings/graphql": ["../../typings/graphql.d.ts"]
8-
},
9-
"allowSyntheticDefaultImports":true
10-
},
11-
"exclude": ["node_modules","build","scripts","jest","public"]
2+
"compilerOptions": {
3+
"paths": {
4+
"typings": ["../../typings/index.d.ts"],
5+
"typings/graphql": ["../../typings/graphql.d.ts"]
6+
},
7+
"allowSyntheticDefaultImports":true
8+
},
9+
"exclude": ["node_modules","build","scripts","jest","public"]
1210
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp