Skip to content

Commit 260a7d3

Browse files
committed
feat(CLI): v2
1 parent 335a988 commit 260a7d3

27 files changed

+4223
-1806
lines changed

.vscode/launch.json

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"type": "node",
6+
"request": "launch",
7+
"name": "Debug CLI",
8+
"program": "${workspaceFolder}/src/cli/cli.ts",
9+
"outFiles": ["${workspaceFolder}/build/main/**/*.js"],
10+
"skipFiles": [
11+
"<node_internals>/**/*.js",
12+
"${workspaceFolder}/node_modules/**/*.js"
13+
],
14+
"preLaunchTask": "npm: build",
15+
"stopOnEntry": true,
16+
"smartStep": true,
17+
"runtimeArgs": ["--nolazy"],
18+
"env": {
19+
"TYPESCRIPT_STARTER_REPO_URL": "${workspaceFolder}"
20+
},
21+
"console": "externalTerminal"
22+
},
23+
{
24+
/// Usage: set appropriate breakpoints in a *.spec.ts file, then open the
25+
// respective *.spec.js file to run this task. Once a breakpoint is hit,
26+
// the debugger will open the source *.spec.ts file for debugging.
27+
"type": "node",
28+
"request": "launch",
29+
"name": "Debug Compiled Test File",
30+
"program": "${workspaceFolder}/node_modules/ava/profile.js",
31+
"args": [
32+
"${file}"
33+
// TODO: VSCode's launch.json variable substitution
34+
// (https://code.visualstudio.com/docs/editor/variables-reference)
35+
// doesn't quite allow us to go from:
36+
// `./src/path/to/file.ts` to `./build/main/path/to/file.js`
37+
// so the user has to navigate to the compiled file manually. (Close:)
38+
// "${workspaceFolder}/build/main/lib/${fileBasenameNoExtension}.js"
39+
],
40+
"skipFiles": ["<node_internals>/**/*.js"],
41+
// Consider using `npm run watch` or `yarn watch` for faster debugging
42+
// "preLaunchTask": "npm: build",
43+
// "smartStep": true,
44+
"runtimeArgs": ["--nolazy"]
45+
}
46+
// TODO: Simpler test debugging option. Discussion:
47+
// https://github.com/avajs/ava/issues/1505#issuecomment-370654427
48+
// {
49+
// "type": "node",
50+
// "request": "launch",
51+
// "name": "Debug Current Test File",
52+
// "program": "${file}",
53+
// "outFiles": ["${workspaceFolder}/build/main/**/*.js"],
54+
// "skipFiles": ["<node_internals>/**/*.js"],
55+
// // Consider using `npm run watch` or `yarn watch` for faster debugging
56+
// // "preLaunchTask": "npm: build",
57+
// // "stopOnEntry": true,
58+
// // "smartStep": true,
59+
// "runtimeArgs": ["--nolazy"],
60+
// "env": {
61+
// "AVA_DEBUG_MODE": "1"
62+
// }
63+
// }
64+
]
65+
}

.vscode/settings.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"typescript.tsdk": "node_modules/typescript/lib",
3+
"typescript.implementationsCodeLens.enabled": true,
4+
"typescript.referencesCodeLens.enabled": true
5+
}

README-starter.md

+2
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
# package-name
2+
3+
description

README.md

+206-85
Large diffs are not rendered by default.

bin/typescript-starter

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env node
2+
3+
/**
4+
* This file needs the 'x' permission to be spawned by tests. Since TypeScript
5+
* doesn't currently offer a way to set permissions of generated files
6+
* (https://github.com/Microsoft/TypeScript/issues/16667), we track this file
7+
* with Git, and simply require the generated CLI.
8+
*/
9+
require('../build/main/cli/cli.js');

0 commit comments

Comments
 (0)