Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 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
1 change: 1 addition & 0 deletions .prettierrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

module.exports = {
printWidth: 100,
plugins: ['prettier-plugin-ember-template-tag'],
overrides: [
{
files: '*.{js,ts,mjs,mts,cjs,cts}',
Expand Down
38 changes: 38 additions & 0 deletions files/demo-app/app.gts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import EmberApp from 'ember-strict-application-resolver';
import EmberRouter from '@ember/routing/router';
import PageTitleService from 'ember-page-title/services/page-title';

class Router extends EmberRouter {
location = 'history';
rootURL = '/';
}

export class App extends EmberApp {
/**
* Any services or anything from the addon that needs to be in the app-tree registry
* will need to be manually specified here.
*
* Techniques to avoid needing this:
* - private services
* - require the consuming app import and configure themselves
* (which is what we're emulating here)
*/
modules = {
'./router': Router,
'./services/page-title': PageTitleService,
/**
* NOTE: this glob will import everything matching the glob,
* and includes non-services in the services directory.
*/
...import.meta.glob('./services/**/*', { eager: true }),
/**
* These imports are not magic, but we do require that all entries in the
* modules object match a ./[type]/[name] pattern.
*
* See: https://rfcs.emberjs.com/id/1132-default-strict-resolver
*/
...import.meta.glob('./templates/**/*', { eager: true }),
};
}

Router.map(function () {});
Empty file added files/demo-app/styles.css
Comment thread
NullVoxPopuli marked this conversation as resolved.
Empty file.
5 changes: 5 additions & 0 deletions files/demo-app/templates/application.gts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const greeting = 'hello';

<template>
{{greeting}}, world!
</template>
24 changes: 24 additions & 0 deletions files/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!doctype html>
<html lang="en-us">

<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Docs App</title>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed

<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1" />

<link rel="stylesheet" href="./docs-app/styles.css" />
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: docs-app


</head>

<body>

<script type="module">
import App from './demo-app/app';

App.create({})
</script>
</body>

</html>
2 changes: 1 addition & 1 deletion files/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
{
"extends": "@ember/app-tsconfig",
"include": ["src/**/*", "tests/**/*", "unpublished-development-types/**/*"],
"include": ["src/**/*", "tests/**/*", "unpublished-development-types/**/*", "demo-app/**/*"],
"compilerOptions": {
"rootDir": ".",
"types": [
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
},
"devDependencies": {
"prettier": "^3.5.3",
"prettier-plugin-ember-template-tag": "2.1.0",
"release-plan": "^0.16.0"
},
"dependencies": {
Expand Down
Loading
Loading