Skip to content

Commit 9c83041

Browse files
Merge pull request #1914 from NullVoxPopuli/upgrade-template-compilation
Upgrade template-compilation
2 parents c748dd1 + cc59986 commit 9c83041

File tree

13 files changed

+120
-87
lines changed

13 files changed

+120
-87
lines changed

apps/repl/app/components/limber/layout/orientation.gts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ interface Signature {
1212
};
1313
}
1414

15-
const { Boolean } = globalThis;
16-
1715
export const Orientation: TOC<Signature> = <template>
1816
<ContainerQuery
1917
@features={{hash isVertical=(aspectRatio max=1.2)}}

apps/repl/app/components/limber/share.gts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ import type RouterService from '@ember/routing/router-service';
2424

2525
const isShowing = cell(false);
2626

27-
const { Boolean } = globalThis;
28-
2927
const not = (x: unknown) => !x;
3028

3129
export const Share = <template>

apps/tutorial/public/docs/1-introduction/6-browser-utilities/answer.gjs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ let data = {
44
terrain: "desert",
55
};
66

7-
let { JSON } = globalThis;
8-
97
localStorage.setItem('localStorage-item', JSON.stringify(data));
108

119
let get = (key) => localStorage.getItem(key);

apps/tutorial/public/docs/1-introduction/6-browser-utilities/prompt.gjs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ let data = {
44
terrain: "desert",
55
};
66

7-
let { JSON } = globalThis;
8-
97
localStorage.setItem('localStorage-item', JSON.stringify(data));
108

119
let get = (key) => localStorage.getItem(key);

apps/tutorial/public/docs/1-introduction/6-browser-utilities/prose.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
All functions available on [`globalThis`][mdn-globalThis] ([window][mdn-Window] in browsers), are available to use in templates.
2-
31
For example, retrieving data from [`localStorage`][mdn-LocalStorage] may be done like this:
42

53
```hbs
@@ -33,7 +31,6 @@ function formatFromStorage(key) {
3331

3432
Since templates are the _source of truth_ for what is visible to users, it's useful to make them as readable as possible. An extra advantage here is that the extracted functions can more easily be unit tested.
3533

36-
[mdn-globalThis]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis
3734
[mdn-Window]: https://developer.mozilla.org/en-US/docs/Web/API/Window
3835
[mdn-LocalStorage]: https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage
3936
[mdn-json-stringify]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify

apps/tutorial/public/docs/12-loading-patterns/1-keeping-latest/answer.gjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { use, resource } from 'ember-resources';
66
import { RemoteData, remoteData } from 'reactiveweb/remote-data';
77
import { keepLatest } from 'reactiveweb/keep-latest';
88

9-
const { JSON } = globalThis;
109
const isEmpty = (x) => !x || x?.length === 0;
1110
const urlFor = (id) => `https://swapi.tech/api/people/${id}`;
1211

apps/tutorial/public/docs/12-loading-patterns/1-keeping-latest/prompt.gjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { use, resource } from 'ember-resources';
66
import { RemoteData, remoteData } from 'reactiveweb/remote-data';
77
import { keepLatest } from 'reactiveweb/keep-latest';
88

9-
const { JSON } = globalThis;
109
const isEmpty = (x) => !x || x?.length === 0;
1110
const urlFor = (id) => `https://swapi.tech/api/people/${id}`;
1211

apps/tutorial/public/docs/8-form-data-controlled/7-contenteditable/answer.gjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { on } from '@ember/modifier';
44
import { fn } from '@ember/helper';
55
import { modifier } from 'ember-modifier';
66

7-
let { document } = globalThis;
87
const bold = () => document.execCommand("bold", false, null);
98
const italic = () => document.execCommand("italic", false, null);
109
const underline = () => document.execCommand("underline", false, null);

apps/tutorial/public/docs/8-form-data-controlled/7-contenteditable/prompt.gjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { on } from '@ember/modifier';
44
import { fn } from '@ember/helper';
55
import { modifier } from 'ember-modifier';
66

7-
let { document } = globalThis;
87
const bold = () => document.execCommand("bold", false, null);
98
const italic = () => document.execCommand("italic", false, null);
109
const underline = () => document.execCommand("underline", false, null);

packages/app-support/limber-ui/addon/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
"@nullvoxpopuli/eslint-configs": "^5.0.0",
7373
"@rollup/plugin-babel": "^6.0.4",
7474
"@tsconfig/ember": "^3.0.9",
75-
"babel-plugin-ember-template-compilation": "^2.3.0",
75+
"babel-plugin-ember-template-compilation": "^2.4.0",
7676
"concurrently": "^9.1.2",
7777
"ember-async-data": "1.0.3",
7878
"ember-cli-htmlbars": "^6.3.0",

0 commit comments

Comments
 (0)