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

Detect missing tsconfig.json and scaffold the basics. #10

Open
Raynos opened this issue Aug 12, 2020 · 1 comment
Open

Detect missing tsconfig.json and scaffold the basics. #10

Raynos opened this issue Aug 12, 2020 · 1 comment

Comments

@Raynos
Copy link
Owner

Raynos commented Aug 12, 2020

If this command is run in a directory which does not have a tsconfig.json and generate the default one.

{
  "extends": "@tsconfig/node12/tsconfig.json",
  "include": ["src/**/*"],
  "exclude": ["node_modules", "**/*.spec.ts"]
}
@Raynos
Copy link
Owner Author

Raynos commented Oct 16, 2020

The way this would look today actually would be to detect no tsconfig.json or jsconfig.json and to scaffold the correct files.

For the jsconfig the following should be an ok starting point

{
  "extends": "./_types/base-tsconfig.json",
  "compilerOptions": {
    "baseUrl": "./",
    "paths": {
      "*" : ["./_types/*"]
    }
  },
  "include": [
    "*.js",
    "test/*.js",
    "_types/**/*.d.ts"
  ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant