-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #627 from buschtoens/enbale-typescript
Enable TypeScript support in addon and test-app
- Loading branch information
Showing
28 changed files
with
677 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# EditorConfig helps developers define and maintain consistent | ||
# coding styles between different editors and IDEs | ||
# editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.hbs] | ||
insert_final_newline = false | ||
|
||
[*.{diff,md}] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"schemaVersion": "1.0.0", | ||
"projectName": "ember-lazy-mount", | ||
"packages": [ | ||
{ | ||
"name": "@embroider/addon-blueprint", | ||
"version": "2.17.0", | ||
"blueprints": [ | ||
{ | ||
"name": "@embroider/addon-blueprint", | ||
"isBaseBlueprint": true, | ||
"options": [ | ||
"--ci-provider=github", | ||
"--pnpm", | ||
"--release-it", | ||
"--typescript" | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,17 @@ | ||
# compiled output | ||
/dist/ | ||
/declarations/ | ||
|
||
# dependencies | ||
/node_modules/ | ||
# The authoritative copies of these live in the monorepo root (because they're | ||
# more useful on github that way), but the build copies them into here so they | ||
# will also appear in published NPM packages. | ||
/README.md | ||
/LICENSE.md | ||
|
||
# misc | ||
/.env* | ||
/.pnp* | ||
/.eslintcache | ||
/coverage/ | ||
/npm-debug.log* | ||
/testem.log | ||
/yarn-error.log | ||
# compiled output | ||
dist/ | ||
declarations/ | ||
|
||
# ember-try | ||
/.node_modules.ember-try/ | ||
/npm-shrinkwrap.json.ember-try | ||
/package.json.ember-try | ||
/package-lock.json.ember-try | ||
/yarn.lock.ember-try | ||
# npm/pnpm/yarn pack output | ||
*.tgz | ||
|
||
# broccoli-debug | ||
/DEBUG/ | ||
# deps & caches | ||
node_modules/ | ||
.eslintcache | ||
.prettiercache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Easily allow apps, which are not yet using strict mode templates, to consume your Glint types, by importing this file. | ||
// Add all your components, helpers and modifiers to the template registry here, so apps don't have to do this. | ||
// See https://typed-ember.gitbook.io/glint/environments/ember/authoring-addons | ||
|
||
// import type MyComponent from './components/my-component'; | ||
|
||
// Remove this once entries have been added! 👇 | ||
// eslint-disable-next-line @typescript-eslint/no-empty-interface | ||
export default interface Registry { | ||
// MyComponent: typeof MyComponent | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{ | ||
"extends": "@tsconfig/ember/tsconfig.json", | ||
"include": [ | ||
"src/**/*", | ||
"unpublished-development-types/**/*" | ||
], | ||
"glint": { | ||
"environment": ["ember-loose", "ember-template-imports"] | ||
}, | ||
"compilerOptions": { | ||
"allowJs": true, | ||
"declarationDir": "declarations", | ||
/** | ||
https://www.typescriptlang.org/tsconfig#noEmit | ||
We want to emit declarations, so this option must be set to `false`. | ||
@tsconfig/ember sets this to `true`, which is incompatible with our need to set `emitDeclarationOnly`. | ||
@tsconfig/ember is more optimized for apps, which wouldn't emit anything, only type check. | ||
*/ | ||
"noEmit": false, | ||
/** | ||
https://www.typescriptlang.org/tsconfig#emitDeclarationOnly | ||
We want to only emit declarations as we use Rollup to emit JavaScript. | ||
*/ | ||
"emitDeclarationOnly": true, | ||
|
||
/** | ||
https://www.typescriptlang.org/tsconfig#noEmitOnError | ||
Do not block emit on TS errors. | ||
*/ | ||
"noEmitOnError": false, | ||
|
||
/** | ||
https://www.typescriptlang.org/tsconfig#rootDir | ||
"Default: The longest common path of all non-declaration input files." | ||
Because we want our declarations' structure to match our rollup output, | ||
we need this "rootDir" to match the "srcDir" in the rollup.config.mjs. | ||
This way, we can have simpler `package.json#exports` that matches | ||
imports to files on disk | ||
*/ | ||
"rootDir": "./src", | ||
|
||
/** | ||
https://www.typescriptlang.org/tsconfig#allowImportingTsExtensions | ||
We want our tooling to know how to resolve our custom files so the appropriate plugins | ||
can do the proper transformations on those files. | ||
*/ | ||
"allowImportingTsExtensions": true | ||
} | ||
} |
Oops, something went wrong.