Skip to content

Commit

Permalink
use splitAtRoute option for livres and que-choisir, as they use a lot…
Browse files Browse the repository at this point in the history
… of specific components
  • Loading branch information
BlueCutOfficial committed May 31, 2024
1 parent 805222d commit cb22af3
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/router.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import EmberRouter from '@ember/routing/router';
import EmberRouter from '@embroider/router';
import config from 'site-books-ember/config/environment';

export default class Router extends EmberRouter {
Expand Down
1 change: 1 addition & 0 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ module.exports = function (defaults) {
staticModifiers: true,
staticComponents: true,
staticEmberSource: true,
splitAtRoutes: ['livres', 'que-choisir'],
});
};
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"@ember/test-helpers": "^3.3.0",
"@embroider/compat": "^3.4.7",
"@embroider/core": "^3.4.7",
"@embroider/router": "^2.1.8",
"@embroider/util": "^1.13.0",
"@embroider/webpack": "^3.2.3",
"@glimmer/component": "^1.1.2",
Expand Down
34 changes: 34 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion tests/unit/controllers/livres-test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import { module, test } from 'qunit';
import { setupTest } from 'site-books-ember/tests/helpers';
import LivresRoute from 'site-books-ember/controllers/livres';

module('Unit | Controller | livres', function (hooks) {
setupTest(hooks);

// TODO: Replace this with your real tests.
hooks.beforeEach(function () {
this.owner.register('controller:livres', LivresRoute);
});

test('it exists', function (assert) {
let controller = this.owner.lookup('controller:livres');
assert.ok(controller);
Expand Down
6 changes: 5 additions & 1 deletion tests/unit/controllers/que-choisir-test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import { module, test } from 'qunit';
import { setupTest } from 'site-books-ember/tests/helpers';
import QueChoisirRoute from 'site-books-ember/controllers/que-choisir';

module('Unit | Controller | que-choisir', function (hooks) {
setupTest(hooks);

// TODO: Replace this with your real tests.
hooks.beforeEach(function () {
this.owner.register('controller:que-choisir', QueChoisirRoute);
});

test('it exists', function (assert) {
let controller = this.owner.lookup('controller:que-choisir');
assert.ok(controller);
Expand Down
5 changes: 5 additions & 0 deletions tests/unit/routes/livres-test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import { module, test } from 'qunit';
import { setupTest } from 'site-books-ember/tests/helpers';
import LivresRoute from 'site-books-ember/routes/livres';

module('Unit | Route | livres', function (hooks) {
setupTest(hooks);

hooks.beforeEach(function () {
this.owner.register('route:livres', LivresRoute);
});

test('it exists', function (assert) {
let route = this.owner.lookup('route:livres');
assert.ok(route);
Expand Down
5 changes: 5 additions & 0 deletions tests/unit/routes/que-choisir-test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import { module, test } from 'qunit';
import { setupTest } from 'site-books-ember/tests/helpers';
import QueChoisirRoute from 'site-books-ember/routes/que-choisir';

module('Unit | Route | que-choisir', function (hooks) {
setupTest(hooks);

hooks.beforeEach(function () {
this.owner.register('route:que-choisir', QueChoisirRoute);
});

test('it exists', function (assert) {
let route = this.owner.lookup('route:que-choisir');
assert.ok(route);
Expand Down

0 comments on commit cb22af3

Please sign in to comment.