Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 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 () {});
6 changes: 6 additions & 0 deletions files/demo-app/styles.css
Comment thread
NullVoxPopuli marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/**
* See: https://vite.dev/guide/features.html#css
* for features beyond normal CSS that are available to you.
*
* This CSS is meant for the demo-app only, and will not be included in the published assets for this library.
*/
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>
1 change: 1 addition & 0 deletions files/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"ember-source": "^6.7.0",
"ember-strict-application-resolver": "^0.1.0",
"ember-template-lint": "^7.9.0",
"ember-page-title": "^8.2.0",
"eslint": "^9.17.0",
"eslint-config-prettier": "^10.1.5",
"eslint-plugin-ember": "^12.3.3",
Expand Down
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