-
Notifications
You must be signed in to change notification settings - Fork 1
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
Remove rollup-plugin-ts #51
Conversation
b90ddde
to
9b38852
Compare
9b38852
to
4be74fa
Compare
"declaration": true, | ||
"declarationDir": "declarations", | ||
"emitDeclarationOnly": true, | ||
"noEmit": false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
glint --declaration
sets the compiler options declaration
, emitDeclarationOnly
, and noEmit
(to true
, true
, and false
, respectively) for the end-developer.
https://github.com/typed-ember/glint/blob/1.0.2/packages/core/src/cli/options.ts#L13-L16
For TS-only projects (i.e. without Glint), it is up to the end-developer to set these compiler options.
@@ -36,10 +38,12 @@ | |||
"lint:hbs:fix": "ember-template-lint . --fix", | |||
"lint:js": "eslint . --cache --ext=.js,.ts", | |||
"lint:js:fix": "eslint . --fix", | |||
"lint:types": "tsc --noEmit", | |||
"lint:types": "tsc --emitDeclarationOnly false --noEmit", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
End-developers can somewhat simplify the lint:types
script if they have 2 TS configuration files, one for development and another for production.
/* package.json for projects without Glint */
"scripts": {
"build:types": "tsc",
"lint:types": "tsc --project tsconfig.development.json",
"start:types": "tsc --watch"
}
/* tsconfig.json */
{
"extends": "@tsconfig/ember/tsconfig.json",
"compilerOptions": {
"declaration": true,
"declarationDir": "declarations",
"emitDeclarationOnly": true,
"noEmit": false
},
"include": [
"src/**/*",
"unpublished-development-types/**/*"
]
}
/* tsconfig.development.json */
{
"extends": "@tsconfig/ember/tsconfig.json",
"compilerOptions": {
"declaration": true,
"declarationDir": "declarations"
},
"include": [
"src/**/*",
"unpublished-development-types/**/*"
]
}
Since it's not likely that a v1 addon had used a second configuration file such as tsconfig.development.json
, I didn't think that the codemod should create this file for end-developers.
Description
This pull request downstreams the solution from embroider-build/addon-blueprint#136.
Migration guides