File tree 5 files changed +28
-10
lines changed
5 files changed +28
-10
lines changed Original file line number Diff line number Diff line change 17
17
uses : denolib/setup-deno@master
18
18
- name : Show Deno version
19
19
run : deno --version
20
+ - name : Run lint
21
+ run : make lint
20
22
- name : Run tests
21
23
run : make test
Original file line number Diff line number Diff line change 1
- .PHONY : test
1
+ SHELL =/bin/bash
2
+ TARGET_SRC =$(shell shopt -s globstar && ls ./** /* .{ts,js,tsx} | grep -v ./vendor | grep -v ./testdata)
2
3
3
4
test :
4
5
deno run --allow-net serve_test.ts
5
6
deno run --allow-net --allow-read static_test.ts
6
7
deno run --allow-net helpers_test.ts
8
+
9
+ lint :
10
+ deno fmt --check $(TARGET_SRC )
11
+
12
+ fmt :
13
+ deno fmt $(TARGET_SRC )
14
+
15
+ .PHONY : test lint format
Original file line number Diff line number Diff line change @@ -192,6 +192,14 @@ interface HTTPResponse {
192
192
dem update https://deno.land/std@v0.xx.x
193
193
```
194
194
195
+ ### Lint
196
+
197
+ - ` make lint `
198
+
199
+ ### Format
200
+
201
+ - ` make fmt `
202
+
195
203
### Testing
196
204
197
205
- ` make test `
Original file line number Diff line number Diff line change 2
2
import {
3
3
h ,
4
4
renderHTML ,
5
- } from ' https://denopkg.com/syumai/deno-libs/jsx/renderer.ts' ;
6
- import { app , get } from ' https://denopkg.com/syumai/dinatra/mod.ts' ;
5
+ } from " https://denopkg.com/syumai/deno-libs/jsx/renderer.ts" ;
6
+ import { app , get } from " https://denopkg.com/syumai/dinatra/mod.ts" ;
7
7
8
8
app (
9
- get ( '/' , ( ) =>
9
+ get ( "/" , ( ) =>
10
10
renderHTML (
11
11
< html >
12
12
< body > Hello, world!</ body >
13
- </ html >
14
- )
15
- )
13
+ </ html > ,
14
+ ) ) ,
16
15
) ;
Original file line number Diff line number Diff line change 1
- const countContainer = document . getElementById ( ' count' ) ;
2
- const plusBtn = document . getElementById ( ' plusBtn' ) ;
1
+ const countContainer = document . getElementById ( " count" ) ;
2
+ const plusBtn = document . getElementById ( " plusBtn" ) ;
3
3
let count = 0 ;
4
- plusBtn . addEventListener ( ' click' , ( ) => {
4
+ plusBtn . addEventListener ( " click" , ( ) => {
5
5
count ++ ;
6
6
countContainer . textContent = count . toString ( ) ;
7
7
} ) ;
You can’t perform that action at this time.
0 commit comments