Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli fix #37

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ function selectLesson() {
const aliasBasePath = `${courseAppNames[selectedCourse]}`
fs.readdirSync(lessonPath).forEach((file) => {
const name = path.basename(file).replace(/\.(js|ts|tsx)$/, '')
alias[path.join(aliasBasePath, name)] = path.join(lessonPath, file)
alias[`${aliasBasePath}/${name}`] = path.join(lessonPath, file)
})

return {
Expand Down
6 changes: 1 addition & 5 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
{
// For lessons, TypeScript will use tsconfig.dev.json which is auto generated
// on each launch of a lesson to adjust includes to be specific for the
// lesson. Both extend tsconfig.base.json, but we need the file that VS Code
// uses for intellisense to use the tsconfig.json filename so that files in
// the courses don't show a bunch of errors.
"__comment__": "Used by VSCode intellisense and needed to prevent course file errors",
"extends": "./tsconfig.base.json",
"include": ["apps", "types", "__mocks__/@types", "courses"]
}