Skip to content

Commit 445e382

Browse files
committed
added vs code tasks ofr debug
1 parent 8b5c140 commit 445e382

File tree

3 files changed

+67
-7
lines changed

3 files changed

+67
-7
lines changed

.vscode/launch.json

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "chrome",
9+
"request": "launch",
10+
"name": "Chrome",
11+
"url": "http://127.0.0.1:8887/examples",
12+
"webRoot": "${workspaceRoot}"
13+
},
14+
{
15+
"type": "node",
16+
"request": "launch",
17+
"name": "Mocha JS",
18+
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
19+
"args": [
20+
"-u",
21+
"tdd",
22+
"--timeout",
23+
"999999",
24+
"--compilers",
25+
"js:babel-core/register",
26+
"--colors",
27+
"${workspaceRoot}/test/js/**/*.spec.js"
28+
],
29+
"internalConsoleOptions": "openOnSessionStart"
30+
},
31+
{
32+
"type": "node",
33+
"request": "launch",
34+
"name": "Mocha TS",
35+
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
36+
"args": [
37+
"-u",
38+
"tdd",
39+
"--timeout",
40+
"999999",
41+
"-r",
42+
"ts-node/register",
43+
"--colors",
44+
"${workspaceRoot}/test/ts/**/*.spec.ts"
45+
],
46+
"internalConsoleOptions": "openOnSessionStart"
47+
}
48+
]
49+
}

.vscode/tasks.json

+15-4
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,20 @@
44
"version": "2.0.0",
55
"tasks": [
66
{
7-
"taskName": "echo",
8-
"type": "shell",
9-
"command": "echo Hello"
10-
}
7+
"type": "npm",
8+
"script": "go",
9+
"group": {
10+
"kind": "build",
11+
"isDefault": true
12+
}
13+
},
14+
{
15+
"type": "npm",
16+
"script": "dev",
17+
"group": {
18+
"kind": "test",
19+
"isDefault": true
20+
}
21+
}
1122
]
1223
}

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@
1414
},
1515
"homepage": "https://github.com/loiane/javascript-datastructures-algorithms",
1616
"scripts": {
17-
"clean": "rm -rf ./dist ./coverage ./.nyc_output",
17+
"clean": "rm -rf ./dist ./coverage ./.nyc_output ./coverage.lcov",
1818
"build:js": "babel src/js -d dist/js",
19-
"build:ts": "tsc",
19+
"build:ts": "tsc -p ./ --rootDir ./src/ts",
2020
"build": "npm run build:js && npm run build:ts",
2121
"lint:js": "eslint src/js && eslint test/js",
2222
"lint:ts": "tslint -c tslint.json 'src/ts/**/*.ts' && tslint -c tslint.json 'test/ts/**/*.ts'",
2323
"lint": "npm run lint:js && npm run lint:ts",
2424
"test:js": "mocha --compilers js:babel-core/register ./test/js/**/*.spec.js",
2525
"test:ts": "mocha -r ts-node/register --recursive ./test/ts/**/*.spec.ts",
2626
"test": "npm run test:js && npm run test:ts",
27-
"test:dev": "npm run clean && npm run generate-report",
27+
"dev": "npm run clean && npm run lint && npm run generate-report",
2828
"coverage": "npm run generate-report && nyc report --reporter=text-lcov > coverage.lcov && codecov",
2929
"generate-report": "nyc --report-dir coverage npm run test && nyc report --reporter=text",
3030
"go": "npm run clean && npm run lint && npm run build"

0 commit comments

Comments
 (0)