ember didn't want to ember, so now it embers again

This commit is contained in:
Melody Becker 2024-09-18 13:49:23 +02:00
parent 5a82179df6
commit 876c7a2b73
56 changed files with 1715 additions and 7649 deletions

View file

@ -2,6 +2,7 @@
/blueprints/*/files/ /blueprints/*/files/
# compiled output # compiled output
/declarations/
/dist/ /dist/
# misc # misc

View file

@ -0,0 +1,56 @@
# frontend-reactive
This README outlines the details of collaborating on this Ember application.
A short introduction of this app could easily go here.
## Prerequisites
You will need the following things properly installed on your computer.
- [Git](https://git-scm.com/)
- [Node.js](https://nodejs.org/) (with npm)
- [Ember CLI](https://cli.emberjs.com/release/)
- [Google Chrome](https://google.com/chrome/)
## Installation
- `git clone <repository-url>` this repository
- `cd frontend-reactive`
- `npm install`
## Running / Development
- `npm run start`
- Visit your app at [http://localhost:4200](http://localhost:4200).
- Visit your tests at [http://localhost:4200/tests](http://localhost:4200/tests).
### Code Generators
Make use of the many generators for code, try `ember help generate` for more details
### Running Tests
- `npm run test`
- `npm run test:ember -- --server`
### Linting
- `npm run lint`
- `npm run lint:fix`
### Building
- `npm exec ember build` (development)
- `npm run build` (production)
### Deploying
Specify what it takes to deploy your app.
## Further Reading / Useful Links
- [ember.js](https://emberjs.com/)
- [ember-cli](https://cli.emberjs.com/release/)
- Development Browser Extensions
- [ember inspector for chrome](https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi)
- [ember inspector for firefox](https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/)

View file

@ -1,7 +1,7 @@
import Application from '@ember/application'; import Application from '@ember/application';
import Resolver from 'ember-resolver'; import Resolver from 'ember-resolver';
import loadInitializers from 'ember-load-initializers'; import loadInitializers from 'ember-load-initializers';
import config from 'frontend-src/config/environment'; import config from 'frontend-reactive/config/environment';
export default class App extends Application { export default class App extends Application {
modulePrefix = config.modulePrefix; modulePrefix = config.modulePrefix;

View file

@ -0,0 +1,4 @@
<div>
<h3>{{@username}}</h3>
<p>{{@content}}</p>
</div>

View file

@ -1,6 +1,6 @@
/** /**
* Type declarations for * Type declarations for
* import config from 'frontend-src/config/environment' * import config from 'frontend-reactive/config/environment'
*/ */
declare const config: { declare const config: {
environment: string; environment: string;

View file

@ -2,14 +2,14 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>FrontendSrc</title> <title>FrontendReactive</title>
<meta name="description" content=""> <meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
{{content-for "head"}} {{content-for "head"}}
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/vendor.css"> <link integrity="" rel="stylesheet" href="{{rootURL}}assets/vendor.css">
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/frontend-src.css"> <link integrity="" rel="stylesheet" href="{{rootURL}}assets/frontend-reactive.css">
{{content-for "head-footer"}} {{content-for "head-footer"}}
</head> </head>
@ -17,7 +17,7 @@
{{content-for "body"}} {{content-for "body"}}
<script src="{{rootURL}}assets/vendor.js"></script> <script src="{{rootURL}}assets/vendor.js"></script>
<script src="{{rootURL}}assets/frontend-src.js"></script> <script src="{{rootURL}}assets/frontend-reactive.js"></script>
{{content-for "body-footer"}} {{content-for "body-footer"}}
</body> </body>

View file

@ -1,5 +1,5 @@
import EmberRouter from '@ember/routing/router'; import EmberRouter from '@ember/routing/router';
import config from 'frontend-src/config/environment'; import config from 'frontend-reactive/config/environment';
export default class Router extends EmberRouter { export default class Router extends EmberRouter {
location = config.locationType; location = config.locationType;
@ -7,8 +7,5 @@ export default class Router extends EmberRouter {
} }
Router.map(function () { Router.map(function () {
this.route('notes', function () { // Add route declarations here
this.route('note', { path: '/:note_id' });
this.route('index', { path: '/' });
});
}); });

View file

@ -0,0 +1,4 @@
{{page-title "FrontendReactive"}}
{{outlet}}
<Timeline::Note @username="bob" @content="Hello world" />

View file

@ -3,7 +3,7 @@
"packages": [ "packages": [
{ {
"name": "ember-cli", "name": "ember-cli",
"version": "5.7.0", "version": "5.11.0",
"blueprints": [ "blueprints": [
{ {
"name": "app", "name": "app",

View file

@ -2,7 +2,7 @@
module.exports = function (environment) { module.exports = function (environment) {
const ENV = { const ENV = {
modulePrefix: 'frontend-src', modulePrefix: 'frontend-reactive',
environment, environment,
rootURL: '/', rootURL: '/',
locationType: 'history', locationType: 'history',

File diff suppressed because it is too large Load diff

View file

@ -1,8 +1,8 @@
{ {
"name": "frontend-src", "name": "frontend-reactive",
"version": "0.0.0", "version": "0.0.0",
"private": true, "private": true,
"description": "Small description for frontend-src goes here", "description": "Small description for frontend-reactive goes here",
"repository": "", "repository": "",
"license": "EUPL-1.2", "license": "EUPL-1.2",
"author": "", "author": "",
@ -26,15 +26,15 @@
"test:ember": "ember test" "test:ember": "ember test"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.24.0", "@babel/core": "^7.25.2",
"@ember/optional-features": "^2.1.0", "@ember/optional-features": "^2.1.0",
"@ember/string": "^3.1.1", "@ember/string": "^3.1.1",
"@ember/test-helpers": "^3.3.0", "@ember/test-helpers": "^3.3.1",
"@glimmer/component": "^1.1.2", "@glimmer/component": "^1.1.2",
"@glimmer/tracking": "^1.1.2", "@glimmer/tracking": "^1.1.2",
"@glint/environment-ember-loose": "^1.3.0", "@glint/environment-ember-loose": "^1.4.0",
"@glint/template": "^1.3.0", "@glint/template": "^1.4.0",
"@tsconfig/ember": "^3.0.4", "@tsconfig/ember": "^3.0.8",
"@types/ember": "^4.0.11", "@types/ember": "^4.0.11",
"@types/ember-data": "^4.4.16", "@types/ember-data": "^4.4.16",
"@types/ember-data__adapter": "^4.0.6", "@types/ember-data__adapter": "^4.0.6",
@ -49,7 +49,7 @@
"@types/ember__destroyable": "^4.0.5", "@types/ember__destroyable": "^4.0.5",
"@types/ember__engine": "^4.0.11", "@types/ember__engine": "^4.0.11",
"@types/ember__error": "^4.0.6", "@types/ember__error": "^4.0.6",
"@types/ember__helper": "^4.0.7", "@types/ember__helper": "^4.0.8",
"@types/ember__modifier": "^4.0.9", "@types/ember__modifier": "^4.0.9",
"@types/ember__object": "^4.0.12", "@types/ember__object": "^4.0.12",
"@types/ember__owner": "^4.0.9", "@types/ember__owner": "^4.0.9",
@ -67,8 +67,8 @@
"@typescript-eslint/parser": "^6.21.0", "@typescript-eslint/parser": "^6.21.0",
"broccoli-asset-rev": "^3.0.0", "broccoli-asset-rev": "^3.0.0",
"concurrently": "^8.2.2", "concurrently": "^8.2.2",
"ember-auto-import": "^2.7.2", "ember-auto-import": "^2.7.4",
"ember-cli": "~5.7.0", "ember-cli": "~5.11.0",
"ember-cli-app-version": "^6.0.1", "ember-cli-app-version": "^6.0.1",
"ember-cli-babel": "^8.2.0", "ember-cli-babel": "^8.2.0",
"ember-cli-clean-css": "^3.0.0", "ember-cli-clean-css": "^3.0.0",
@ -77,32 +77,32 @@
"ember-cli-inject-live-reload": "^2.1.0", "ember-cli-inject-live-reload": "^2.1.0",
"ember-cli-sri": "^2.1.1", "ember-cli-sri": "^2.1.1",
"ember-cli-terser": "^4.0.2", "ember-cli-terser": "^4.0.2",
"ember-data": "~5.3.3", "ember-data": "~5.3.8",
"ember-fetch": "^8.1.2", "ember-fetch": "^8.1.2",
"ember-load-initializers": "^2.1.2", "ember-load-initializers": "^2.1.2",
"ember-modifier": "^4.1.0", "ember-modifier": "^4.2.0",
"ember-page-title": "^8.2.2", "ember-page-title": "^8.2.3",
"ember-qunit": "^8.0.2", "ember-qunit": "^8.1.0",
"ember-resolver": "^11.0.1", "ember-resolver": "^11.0.1",
"ember-source": "~5.7.0", "ember-source": "~5.11.0",
"ember-template-lint": "^5.13.0", "ember-template-lint": "^5.13.0",
"ember-welcome-page": "^7.0.2", "ember-welcome-page": "^7.0.2",
"eslint": "^8.57.0", "eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0", "eslint-config-prettier": "^9.1.0",
"eslint-plugin-ember": "^11.12.0", "eslint-plugin-ember": "^11.12.0",
"eslint-plugin-n": "^16.6.2", "eslint-plugin-n": "^16.6.2",
"eslint-plugin-prettier": "^5.1.3", "eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-qunit": "^8.1.1", "eslint-plugin-qunit": "^8.1.1",
"loader.js": "^4.7.0", "loader.js": "^4.7.0",
"prettier": "^3.2.5", "prettier": "^3.3.3",
"qunit": "^2.20.1", "qunit": "^2.22.0",
"qunit-dom": "^2.0.0", "qunit-dom": "^2.0.0",
"stylelint": "^15.11.0", "stylelint": "^15.11.0",
"stylelint-config-standard": "^34.0.0", "stylelint-config-standard": "^34.0.0",
"stylelint-prettier": "^4.1.0", "stylelint-prettier": "^4.1.0",
"tracked-built-ins": "^3.3.0", "tracked-built-ins": "^3.3.0",
"typescript": "^5.3.3", "typescript": "^5.5.4",
"webpack": "^5.90.3" "webpack": "^5.93.0"
}, },
"engines": { "engines": {
"node": ">= 18" "node": ">= 18"

View file

@ -24,7 +24,7 @@ function setupApplicationTest(hooks: NestedHooks, options?: SetupTestOptions) {
// This is also a good place to call test setup functions coming // This is also a good place to call test setup functions coming
// from other addons: // from other addons:
// //
// setupIntl(hooks); // ember-intl // setupIntl(hooks, 'en-us'); // ember-intl
// setupMirage(hooks); // ember-cli-mirage // setupMirage(hooks); // ember-cli-mirage
} }

View file

@ -2,7 +2,7 @@
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>FrontendSrc Tests</title> <title>FrontendReactive Tests</title>
<meta name="description" content=""> <meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
@ -10,7 +10,7 @@
{{content-for "test-head"}} {{content-for "test-head"}}
<link rel="stylesheet" href="{{rootURL}}assets/vendor.css"> <link rel="stylesheet" href="{{rootURL}}assets/vendor.css">
<link rel="stylesheet" href="{{rootURL}}assets/frontend-src.css"> <link rel="stylesheet" href="{{rootURL}}assets/frontend-reactive.css">
<link rel="stylesheet" href="{{rootURL}}assets/test-support.css"> <link rel="stylesheet" href="{{rootURL}}assets/test-support.css">
{{content-for "head-footer"}} {{content-for "head-footer"}}
@ -30,7 +30,7 @@
<script src="/testem.js" integrity="" data-embroider-ignore></script> <script src="/testem.js" integrity="" data-embroider-ignore></script>
<script src="{{rootURL}}assets/vendor.js"></script> <script src="{{rootURL}}assets/vendor.js"></script>
<script src="{{rootURL}}assets/test-support.js"></script> <script src="{{rootURL}}assets/test-support.js"></script>
<script src="{{rootURL}}assets/frontend-src.js"></script> <script src="{{rootURL}}assets/frontend-reactive.js"></script>
<script src="{{rootURL}}assets/tests.js"></script> <script src="{{rootURL}}assets/tests.js"></script>
{{content-for "body-footer"}} {{content-for "body-footer"}}

View file

@ -1,24 +1,24 @@
import { module, test } from 'qunit'; import { module, test } from 'qunit';
import { setupRenderingTest } from 'frontend-src/tests/helpers'; import { setupRenderingTest } from 'frontend-reactive/tests/helpers';
import { render } from '@ember/test-helpers'; import { render } from '@ember/test-helpers';
import { hbs } from 'ember-cli-htmlbars'; import { hbs } from 'ember-cli-htmlbars';
module('Integration | Component | note', function (hooks) { module('Integration | Component | timeline/note', function (hooks) {
setupRenderingTest(hooks); setupRenderingTest(hooks);
test('it renders', async function (assert) { test('it renders', async function (assert) {
// Set any properties with this.set('myProperty', 'value'); // Set any properties with this.set('myProperty', 'value');
// Handle any actions with this.set('myAction', function(val) { ... }); // Handle any actions with this.set('myAction', function(val) { ... });
await render(hbs`<Note />`); await render(hbs`<Timeline::Note />`);
assert.dom().hasText(''); assert.dom().hasText('');
// Template block usage: // Template block usage:
await render(hbs` await render(hbs`
<Note> <Timeline::Note>
template block text template block text
</Note> </Timeline::Note>
`); `);
assert.dom().hasText('template block text'); assert.dom().hasText('template block text');

View file

@ -1,5 +1,5 @@
import Application from 'frontend-src/app'; import Application from 'frontend-reactive/app';
import config from 'frontend-src/config/environment'; import config from 'frontend-reactive/config/environment';
import * as QUnit from 'qunit'; import * as QUnit from 'qunit';
import { setApplication } from '@ember/test-helpers'; import { setApplication } from '@ember/test-helpers';
import { setup } from 'qunit-dom'; import { setup } from 'qunit-dom';

View file

@ -6,8 +6,8 @@
// work with TypeScript. // work with TypeScript.
"baseUrl": ".", "baseUrl": ".",
"paths": { "paths": {
"frontend-src/tests/*": ["tests/*"], "frontend-reactive/tests/*": ["tests/*"],
"frontend-src/*": ["app/*"], "frontend-reactive/*": ["app/*"],
"*": ["types/*"] "*": ["types/*"]
} }
} }

View file

@ -1,56 +0,0 @@
# frontend-src
This README outlines the details of collaborating on this Ember application.
A short introduction of this app could easily go here.
## Prerequisites
You will need the following things properly installed on your computer.
* [Git](https://git-scm.com/)
* [Node.js](https://nodejs.org/) (with npm)
* [Ember CLI](https://cli.emberjs.com/release/)
* [Google Chrome](https://google.com/chrome/)
## Installation
* `git clone <repository-url>` this repository
* `cd frontend-src`
* `npm install`
## Running / Development
* `npm run start`
* Visit your app at [http://localhost:4200](http://localhost:4200).
* Visit your tests at [http://localhost:4200/tests](http://localhost:4200/tests).
### Code Generators
Make use of the many generators for code, try `ember help generate` for more details
### Running Tests
* `npm run test`
* `npm run test:ember -- --server`
### Linting
* `npm run lint`
* `npm run lint:fix`
### Building
* `npm exec ember build` (development)
* `npm run build` (production)
### Deploying
Specify what it takes to deploy your app.
## Further Reading / Useful Links
* [ember.js](https://emberjs.com/)
* [ember-cli](https://cli.emberjs.com/release/)
* Development Browser Extensions
* [ember inspector for chrome](https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi)
* [ember inspector for firefox](https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/)

View file

@ -1 +0,0 @@
{{yield}}

View file

@ -1,14 +0,0 @@
import Component from '@glimmer/component';
export interface NoteSignature {
// The arguments accepted by the component
Args: {};
// Any blocks yielded by the component
Blocks: {
default: [];
};
// The element to which `...attributes` is applied in the component template
Element: null;
}
export default class NoteComponent extends Component<NoteSignature> {}

View file

@ -1,3 +0,0 @@
import Route from '@ember/routing/route';
export default class NotesRoute extends Route {}

View file

@ -1,3 +0,0 @@
import Route from '@ember/routing/route';
export default class NotesIndexRoute extends Route {}

View file

@ -1,9 +0,0 @@
import Route from '@ember/routing/route';
import type Transition from '@ember/routing/transition';
export default class NotesNoteRoute extends Route {
model(params: any, transition: Transition) {
console.log(params);
return { title: params.note_id };
}
}

View file

@ -1,4 +0,0 @@
{{page-title "FrontendSrc"}}
<h1>Home page</h1>
{{outlet}}

View file

@ -1,3 +0,0 @@
{{page-title "Notes"}}
<h2>Note wrapper</h2>
{{outlet}}

View file

@ -1,4 +0,0 @@
{{page-title "Index"}}
<h3>Note index</h3>
{{outlet}}

View file

@ -1,4 +0,0 @@
{{page-title "Note"}}
<h3>Note {{@model.title}}</h3>
{{outlet}}

View file

@ -1,11 +0,0 @@
import { module, test } from 'qunit';
import { setupTest } from 'frontend-src/tests/helpers';
module('Unit | Route | notes', function (hooks) {
setupTest(hooks);
test('it exists', function (assert) {
const route = this.owner.lookup('route:notes');
assert.ok(route);
});
});

View file

@ -1,11 +0,0 @@
import { module, test } from 'qunit';
import { setupTest } from 'frontend-src/tests/helpers';
module('Unit | Route | notes/index', function (hooks) {
setupTest(hooks);
test('it exists', function (assert) {
const route = this.owner.lookup('route:notes/index');
assert.ok(route);
});
});

View file

@ -1,11 +0,0 @@
import { module, test } from 'qunit';
import { setupTest } from 'frontend-src/tests/helpers';
module('Unit | Route | notes/note', function (hooks) {
setupTest(hooks);
test('it exists', function (assert) {
const route = this.owner.lookup('route:notes/note');
assert.ok(route);
});
});