-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix fixtures for Embroider + TypeScript
Fixes after review Fixes after Dan's review Fixes after rebase Add declarations to gitignore
- Loading branch information
1 parent
d337b6f
commit 7710aa0
Showing
20 changed files
with
254 additions
and
81 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 |
---|---|---|
@@ -1,5 +1,9 @@ | ||
'use strict'; | ||
|
||
module.exports = { | ||
name: require('./package').name, | ||
name: require('./package').name,<% if (typescript) {%> | ||
|
||
options: { | ||
'ember-cli-babel': { enableTypeScriptTransform: true }, | ||
},<% } %> | ||
}; |
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# compiled output | ||
/dist/ | ||
/declarations/ | ||
|
||
# dependencies | ||
/node_modules/ | ||
|
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 |
---|---|---|
|
@@ -10,6 +10,5 @@ | |
"<%= name %>/*": ["app/*"], | ||
"*": ["types/*"] | ||
} | ||
}, | ||
"include": ["app/**/*", "tests/**/*", "types/**/*"] | ||
} | ||
} |
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,9 @@ | ||
'use strict'; | ||
|
||
module.exports = { | ||
name: require('./package').name, | ||
|
||
options: { | ||
'ember-cli-babel': { enableTypeScriptTransform: true }, | ||
}, | ||
}; |
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
14 changes: 14 additions & 0 deletions
14
tests/fixtures/app/typescript-embroider/app/config/environment.d.ts
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,14 @@ | ||
/** | ||
* Type declarations for | ||
* import config from 'foo/config/environment' | ||
*/ | ||
declare const config: { | ||
environment: string; | ||
modulePrefix: string; | ||
podModulePrefix: string; | ||
locationType: 'history' | 'hash' | 'none' | 'auto'; | ||
rootURL: string; | ||
APP: Record<string, unknown>; | ||
}; | ||
|
||
export default config; |
20 changes: 20 additions & 0 deletions
20
tests/fixtures/app/typescript-embroider/ember-cli-build.js
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,20 @@ | ||
'use strict'; | ||
|
||
const EmberApp = require('ember-cli/lib/broccoli/ember-app'); | ||
|
||
module.exports = function (defaults) { | ||
const app = new EmberApp(defaults, { | ||
'ember-cli-babel': { enableTypeScriptTransform: true }, | ||
|
||
// Add options here | ||
}); | ||
|
||
const { Webpack } = require('@embroider/webpack'); | ||
return require('@embroider/compat').compatBuild(app, Webpack, { | ||
skipBabel: [ | ||
{ | ||
package: 'qunit', | ||
}, | ||
], | ||
}); | ||
}; |
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,113 @@ | ||
{ | ||
"name": "foo", | ||
"version": "0.0.0", | ||
"private": true, | ||
"description": "Small description for foo goes here", | ||
"repository": "", | ||
"license": "MIT", | ||
"author": "", | ||
"directories": { | ||
"doc": "doc", | ||
"test": "tests" | ||
}, | ||
"scripts": { | ||
"build": "ember build --environment=production", | ||
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"", | ||
"lint:css": "stylelint \"**/*.css\"", | ||
"lint:css:fix": "concurrently \"npm:lint:css -- --fix\"", | ||
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"", | ||
"lint:hbs": "ember-template-lint .", | ||
"lint:hbs:fix": "ember-template-lint . --fix", | ||
"lint:js": "eslint . --cache", | ||
"lint:js:fix": "eslint . --fix", | ||
"lint:types": "tsc --noEmit", | ||
"start": "ember serve", | ||
"test": "concurrently \"npm:lint\" \"npm:test:*\" --names \"lint,test:\"", | ||
"test:ember": "ember test" | ||
}, | ||
"devDependencies": { | ||
"@ember/optional-features": "^2.0.0", | ||
"@ember/string": "^3.1.1", | ||
"@ember/test-helpers": "^3.1.0", | ||
"@embroider/compat": "^2.1.1", | ||
"@embroider/core": "^2.1.1", | ||
"@embroider/webpack": "^2.1.1", | ||
"@glimmer/component": "^1.1.2", | ||
"@glimmer/tracking": "^1.1.2", | ||
"@glint/environment-ember-loose": "^1.0.2", | ||
"@glint/template": "^1.0.2", | ||
"@tsconfig/ember": "^2.0.0", | ||
"@types/ember": "^4.0.3", | ||
"@types/ember-data": "^4.4.10", | ||
"@types/ember-data__adapter": "^4.0.1", | ||
"@types/ember-data__model": "^4.0.0", | ||
"@types/ember-data__serializer": "^4.0.1", | ||
"@types/ember-data__store": "^4.0.2", | ||
"@types/ember__application": "^4.0.5", | ||
"@types/ember__array": "^4.0.3", | ||
"@types/ember__component": "^4.0.13", | ||
"@types/ember__controller": "^4.0.4", | ||
"@types/ember__debug": "^4.0.3", | ||
"@types/ember__destroyable": "^4.0.1", | ||
"@types/ember__engine": "^4.0.4", | ||
"@types/ember__error": "^4.0.2", | ||
"@types/ember__helper": "^4.0.1", | ||
"@types/ember__modifier": "^4.0.3", | ||
"@types/ember__object": "^4.0.5", | ||
"@types/ember__owner": "^4.0.3", | ||
"@types/ember__polyfills": "^4.0.1", | ||
"@types/ember__routing": "^4.0.12", | ||
"@types/ember__runloop": "^4.0.2", | ||
"@types/ember__service": "^4.0.2", | ||
"@types/ember__string": "^3.0.10", | ||
"@types/ember__template": "^4.0.1", | ||
"@types/ember__test": "^4.0.1", | ||
"@types/ember__utils": "^4.0.2", | ||
"@types/qunit": "^2.19.5", | ||
"@types/rsvp": "^4.0.4", | ||
"@typescript-eslint/eslint-plugin": "^5.60.0", | ||
"@typescript-eslint/parser": "^5.60.0", | ||
"broccoli-asset-rev": "^3.0.0", | ||
"concurrently": "^8.2.0", | ||
"ember-auto-import": "^2.6.3", | ||
"ember-cli": "~<%= emberCLIVersion %>", | ||
"ember-cli-app-version": "^6.0.1", | ||
"ember-cli-babel": "^7.26.11", | ||
"ember-cli-clean-css": "^2.0.0", | ||
"ember-cli-dependency-checker": "^3.3.2", | ||
"ember-cli-htmlbars": "^6.2.0", | ||
"ember-cli-inject-live-reload": "^2.1.0", | ||
"ember-data": "~5.1.0-beta.0", | ||
"ember-fetch": "^8.1.2", | ||
"ember-load-initializers": "^2.1.2", | ||
"ember-modifier": "^4.1.0", | ||
"ember-page-title": "^7.0.0", | ||
"ember-qunit": "^7.0.0", | ||
"ember-resolver": "^10.1.1", | ||
"ember-source": "~5.1.0-beta.1", | ||
"ember-template-lint": "^5.10.3", | ||
"ember-welcome-page": "^7.0.2", | ||
"eslint": "^8.43.0", | ||
"eslint-config-prettier": "^8.8.0", | ||
"eslint-plugin-ember": "^11.8.0", | ||
"eslint-plugin-n": "^16.0.0", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
"eslint-plugin-qunit": "^7.3.4", | ||
"loader.js": "^4.7.0", | ||
"prettier": "^2.8.8", | ||
"qunit": "^2.19.4", | ||
"qunit-dom": "^2.0.0", | ||
"stylelint": "^15.8.0", | ||
"stylelint-config-standard": "^33.0.0", | ||
"stylelint-prettier": "^3.0.0", | ||
"tracked-built-ins": "^3.1.1", | ||
"typescript": "^5.0.4", | ||
"webpack": "^5.87.0" | ||
}, | ||
"engines": { | ||
"node": "16.* || >= 18" | ||
}, | ||
"ember": { | ||
"edition": "octane" | ||
} | ||
} |
Oops, something went wrong.