@inglorious/create-app 0.5.1 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/package.json +1 -1
  2. package/templates/js/src/app.js +2 -2
  3. package/templates/js/src/main.js +2 -2
  4. package/templates/js/src/store/entities.js +3 -3
  5. package/templates/js/src/store/index.js +2 -2
  6. package/templates/js/src/{message → types}/message.js +1 -1
  7. package/templates/js/vite.config.js +7 -1
  8. package/templates/js-jsx/src/app.jsx +5 -2
  9. package/templates/js-jsx/src/main.js +2 -2
  10. package/templates/js-jsx/src/store/entities.js +3 -3
  11. package/templates/js-jsx/src/store/index.js +2 -2
  12. package/templates/js-jsx/src/{message → types}/message.jsx +1 -1
  13. package/templates/js-jsx/vite.config.js +7 -1
  14. package/templates/js-vue/src/app.vue +8 -1
  15. package/templates/js-vue/src/main.js +2 -2
  16. package/templates/js-vue/src/store/entities.js +3 -3
  17. package/templates/js-vue/src/store/index.js +2 -2
  18. package/templates/js-vue/vite.config.js +7 -1
  19. package/templates/minimal/src/app.js +2 -2
  20. package/templates/minimal/src/main.js +2 -2
  21. package/templates/minimal/src/store/entities.js +3 -3
  22. package/templates/minimal/src/store/index.js +2 -2
  23. package/templates/minimal/src/{message → types}/message.js +1 -1
  24. package/templates/ssx-js/src/pages/about.js +1 -1
  25. package/templates/ssx-js/src/pages/index.js +1 -1
  26. package/templates/ssx-js/src/store/entities.js +1 -1
  27. package/templates/ssx-ts/src/pages/about.ts +1 -1
  28. package/templates/ssx-ts/src/pages/index.ts +1 -1
  29. package/templates/ssx-ts/src/store/entities.ts +1 -1
  30. package/templates/ssx-ts/types/index.d.ts +2 -2
  31. package/templates/ts/src/app.ts +2 -2
  32. package/templates/ts/src/main.ts +2 -2
  33. package/templates/ts/src/store/entities.ts +3 -3
  34. package/templates/ts/src/store/index.ts +2 -2
  35. package/templates/ts/src/{message → types}/message.ts +1 -1
  36. package/templates/ts/types/index.d.ts +1 -1
  37. package/templates/ts/vite.config.ts +7 -1
  38. package/templates/ts-jsx/src/app.tsx +10 -3
  39. package/templates/ts-jsx/src/main.ts +2 -2
  40. package/templates/ts-jsx/src/store/entities.ts +3 -3
  41. package/templates/ts-jsx/src/store/index.ts +2 -2
  42. package/templates/ts-jsx/src/{message → types}/message.tsx +1 -1
  43. package/templates/ts-jsx/types/index.d.ts +1 -1
  44. package/templates/ts-jsx/vite.config.ts +7 -1
  45. package/templates/ts-vue/src/app.vue +8 -1
  46. package/templates/ts-vue/src/main.ts +2 -2
  47. package/templates/ts-vue/src/store/entities.ts +3 -3
  48. package/templates/ts-vue/src/store/index.ts +2 -2
  49. package/templates/ts-vue/types/index.d.ts +1 -1
  50. package/templates/ts-vue/vite.config.ts +7 -1
  51. package/templates/js-vue/src/{message → types}/message.vue +4 -4
  52. package/templates/ts-vue/src/{message → types}/message.vue +4 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inglorious/create-app",
3
- "version": "0.5.1",
3
+ "version": "1.0.1",
4
4
  "description": "A scaffolding tool to quickly create a new app with Inglorious Web.",
5
5
  "author": "IceOnFire <antony.mistretta@gmail.com> (https://ingloriouscoderz.it)",
6
6
  "license": "MIT",
@@ -1,7 +1,7 @@
1
1
  import { html } from "@inglorious/web"
2
2
 
3
- export const app = {
4
- render(api) {
3
+ export const App = {
4
+ render(props, api) {
5
5
  return html`<h1>
6
6
  ${api.render("message1")}, ${api.render("message2")},
7
7
  ${api.render("message3")}!
@@ -1,6 +1,6 @@
1
1
  import { mount } from "@inglorious/web"
2
2
 
3
- import { app } from "./app"
3
+ import { App } from "./app"
4
4
  import { store } from "./store"
5
5
 
6
- mount(store, app.render, document.getElementById("root"))
6
+ mount(store, (api) => App.render(null, api), document.getElementById("root"))
@@ -1,14 +1,14 @@
1
1
  export const entities = {
2
2
  message1: {
3
- type: "message",
3
+ type: "Message",
4
4
  who: "world",
5
5
  },
6
6
  message2: {
7
- type: "message",
7
+ type: "Message",
8
8
  who: "wide",
9
9
  },
10
10
  message3: {
11
- type: "message",
11
+ type: "Message",
12
12
  who: "web",
13
13
  },
14
14
  }
@@ -1,11 +1,11 @@
1
1
  import { createStore } from "@inglorious/web"
2
2
 
3
- import { message } from "../message/message"
3
+ import { Message } from "../types/message"
4
4
  import { entities } from "./entities"
5
5
  import { middlewares } from "./middlewares"
6
6
 
7
7
  export const store = createStore({
8
- types: { message },
8
+ types: { Message },
9
9
  entities,
10
10
  middlewares,
11
11
  })
@@ -1,6 +1,6 @@
1
1
  import { html } from "@inglorious/web"
2
2
 
3
- export const message = {
3
+ export const Message = {
4
4
  click(entity) {
5
5
  entity.isUpperCase = !entity.isUpperCase
6
6
  },
@@ -10,7 +10,13 @@ const __dirname = path.dirname(__filename)
10
10
 
11
11
  // https://vite.dev/config/
12
12
  export default defineConfig({
13
- plugins: [minifyTemplateLiterals(), ViteImageOptimizer()],
13
+ plugins: [ViteImageOptimizer()],
14
+
15
+ build: {
16
+ rollupOptions: {
17
+ plugins: [minifyTemplateLiterals()],
18
+ },
19
+ },
14
20
 
15
21
  resolve: {
16
22
  alias: {
@@ -1,8 +1,11 @@
1
- export const app = {
1
+ import { Message } from "./types/message"
2
+
3
+ export const App = {
2
4
  render() {
3
5
  return (
4
6
  <h1>
5
- <Message1 />, <Message2 />, <Message3 />!
7
+ <Message entityId="message1" />, <Message entityId="message2" />,{" "}
8
+ <Message entityId="message3" />!
6
9
  </h1>
7
10
  )
8
11
  },
@@ -1,6 +1,6 @@
1
1
  import { mount } from "@inglorious/web"
2
2
 
3
- import { app } from "./app"
3
+ import { App } from "./app"
4
4
  import { store } from "./store"
5
5
 
6
- mount(store, app.render, document.getElementById("root"))
6
+ mount(store, (api) => App.render(null, api), document.getElementById("root"))
@@ -1,14 +1,14 @@
1
1
  export const entities = {
2
2
  message1: {
3
- type: "message",
3
+ type: "Message",
4
4
  who: "world",
5
5
  },
6
6
  message2: {
7
- type: "message",
7
+ type: "Message",
8
8
  who: "wide",
9
9
  },
10
10
  message3: {
11
- type: "message",
11
+ type: "Message",
12
12
  who: "web",
13
13
  },
14
14
  }
@@ -1,11 +1,11 @@
1
1
  import { createStore } from "@inglorious/web"
2
2
 
3
- import { message } from "../message/message"
3
+ import { Message } from "../types/message"
4
4
  import { entities } from "./entities"
5
5
  import { middlewares } from "./middlewares"
6
6
 
7
7
  export const store = createStore({
8
- types: { message },
8
+ types: { Message },
9
9
  entities,
10
10
  middlewares,
11
11
  })
@@ -1,4 +1,4 @@
1
- export const message = {
1
+ export const Message = {
2
2
  click(entity) {
3
3
  entity.isUpperCase = !entity.isUpperCase
4
4
  },
@@ -11,7 +11,13 @@ const __dirname = path.dirname(__filename)
11
11
 
12
12
  // https://vite.dev/config/
13
13
  export default defineConfig({
14
- plugins: [minifyTemplateLiterals(), ViteImageOptimizer(), jsx()],
14
+ plugins: [ViteImageOptimizer(), jsx()],
15
+
16
+ build: {
17
+ rollupOptions: {
18
+ plugins: [minifyTemplateLiterals()],
19
+ },
20
+ },
15
21
 
16
22
  resolve: {
17
23
  alias: {
@@ -1,3 +1,10 @@
1
+ <script>
2
+ import { Message } from "./types/message.vue"
3
+ </script>
4
+
1
5
  <template>
2
- <h1><Message1 />, <Message2 />, <Message3 />!</h1>
6
+ <h1>
7
+ <Message v-bind="message1" />, <Message v-bind="message2" />,
8
+ <Message v-bind="message3" />!
9
+ </h1>
3
10
  </template>
@@ -1,6 +1,6 @@
1
1
  import { mount } from "@inglorious/web"
2
2
 
3
- import { app } from "./app.vue"
3
+ import { App } from "./app.vue"
4
4
  import { store } from "./store"
5
5
 
6
- mount(store, (api) => app.render(null, api), document.getElementById("root"))
6
+ mount(store, (api) => App.render(null, api), document.getElementById("root"))
@@ -1,14 +1,14 @@
1
1
  export const entities = {
2
2
  message1: {
3
- type: "message",
3
+ type: "Message",
4
4
  who: "world",
5
5
  },
6
6
  message2: {
7
- type: "message",
7
+ type: "Message",
8
8
  who: "wide",
9
9
  },
10
10
  message3: {
11
- type: "message",
11
+ type: "Message",
12
12
  who: "web",
13
13
  },
14
14
  }
@@ -1,11 +1,11 @@
1
1
  import { createStore } from "@inglorious/web"
2
2
 
3
- import { message } from "../message/message.vue"
3
+ import { Message } from "../types/message.vue"
4
4
  import { entities } from "./entities"
5
5
  import { middlewares } from "./middlewares"
6
6
 
7
7
  export const store = createStore({
8
- types: { message },
8
+ types: { Message },
9
9
  entities,
10
10
  middlewares,
11
11
  })
@@ -11,7 +11,13 @@ const __dirname = path.dirname(__filename)
11
11
 
12
12
  // https://vite.dev/config/
13
13
  export default defineConfig({
14
- plugins: [minifyTemplateLiterals(), ViteImageOptimizer(), vue()],
14
+ plugins: [ViteImageOptimizer(), vue()],
15
+
16
+ build: {
17
+ rollupOptions: {
18
+ plugins: [minifyTemplateLiterals()],
19
+ },
20
+ },
15
21
 
16
22
  resolve: {
17
23
  alias: {
@@ -1,7 +1,7 @@
1
1
  import { html } from "@inglorious/web"
2
2
 
3
- export const app = {
4
- render(api) {
3
+ export const App = {
4
+ render(props, api) {
5
5
  return html`<h1>
6
6
  ${api.render("message1")}, ${api.render("message2")},
7
7
  ${api.render("message3")}!
@@ -1,6 +1,6 @@
1
1
  import { mount } from "@inglorious/web"
2
2
 
3
- import { app } from "./app.js"
3
+ import { App } from "./app.js"
4
4
  import { store } from "./store/index.js"
5
5
 
6
- mount(store, app.render, document.getElementById("root"))
6
+ mount(store, (api) => App.render(null, api), document.getElementById("root"))
@@ -1,14 +1,14 @@
1
1
  export const entities = {
2
2
  message1: {
3
- type: "message",
3
+ type: "Message",
4
4
  who: "world",
5
5
  },
6
6
  message2: {
7
- type: "message",
7
+ type: "Message",
8
8
  who: "wide",
9
9
  },
10
10
  message3: {
11
- type: "message",
11
+ type: "Message",
12
12
  who: "web",
13
13
  },
14
14
  }
@@ -1,11 +1,11 @@
1
1
  import { createStore } from "@inglorious/web"
2
2
 
3
- import { message } from "../message/message.js"
3
+ import { Message } from "../types/message.js"
4
4
  import { entities } from "./entities.js"
5
5
  import { middlewares } from "./middlewares.js"
6
6
 
7
7
  export const store = createStore({
8
- types: { message },
8
+ types: { Message },
9
9
  entities,
10
10
  middlewares,
11
11
  })
@@ -1,6 +1,6 @@
1
1
  import { html } from "@inglorious/web"
2
2
 
3
- export const message = {
3
+ export const Message = {
4
4
  click(entity) {
5
5
  entity.isUpperCase = !entity.isUpperCase
6
6
  },
@@ -1,6 +1,6 @@
1
1
  import { html } from "@inglorious/web"
2
2
 
3
- export const about = {
3
+ export const About = {
4
4
  click(entity) {
5
5
  entity.name += "!"
6
6
  },
@@ -1,6 +1,6 @@
1
1
  import { html } from "@inglorious/web"
2
2
 
3
- export const index = {
3
+ export const Index = {
4
4
  render() {
5
5
  return html`
6
6
  <div>
@@ -1,6 +1,6 @@
1
1
  export const entities = {
2
2
  about: {
3
- type: "about",
3
+ type: "About",
4
4
  name: "Us",
5
5
  },
6
6
  }
@@ -2,7 +2,7 @@ import { Api, html } from "@inglorious/web"
2
2
 
3
3
  import type { AboutEntity } from "../../types"
4
4
 
5
- export const about = {
5
+ export const About = {
6
6
  click(entity: AboutEntity) {
7
7
  entity.name += "!"
8
8
  },
@@ -1,6 +1,6 @@
1
1
  import { html } from "@inglorious/web"
2
2
 
3
- export const index = {
3
+ export const Index = {
4
4
  render() {
5
5
  return html`
6
6
  <div>
@@ -2,7 +2,7 @@ import { AppState } from "../../types"
2
2
 
3
3
  export const entities: AppState = {
4
4
  about: {
5
- type: "about",
5
+ type: "About",
6
6
  name: "Us",
7
7
  },
8
8
  }
@@ -2,7 +2,7 @@ import { BaseEntity, EntitiesState } from "@inglorious/store"
2
2
 
3
3
  // Define your entity types
4
4
  export interface AboutEntity extends BaseEntity {
5
- type: "about"
5
+ type: "About"
6
6
  id?: string
7
7
  name: string
8
8
  }
@@ -17,7 +17,7 @@ export interface AppState extends EntitiesState<AppEntity> {
17
17
 
18
18
  // Types configuration
19
19
  export interface AppTypes {
20
- about: {
20
+ About: {
21
21
  click: (entity: AboutEntity) => void
22
22
  }
23
23
  }
@@ -1,7 +1,7 @@
1
1
  import { type Api, html } from "@inglorious/web"
2
2
 
3
- export const app = {
4
- render(api: Api) {
3
+ export const App = {
4
+ render(props: Record<string, unknown> | null, api: Api) {
5
5
  return html`<h1>
6
6
  ${api.render("message1")}, ${api.render("message2")},
7
7
  ${api.render("message3")}!
@@ -1,6 +1,6 @@
1
1
  import { mount } from "@inglorious/web"
2
2
 
3
- import { app } from "./app"
3
+ import { App } from "./app"
4
4
  import { store } from "./store"
5
5
 
6
- mount(store, app.render, document.getElementById("root")!)
6
+ mount(store, (api) => App.render(null, api), document.getElementById("root")!)
@@ -2,15 +2,15 @@ import type { AppState } from "../../types"
2
2
 
3
3
  export const entities: AppState = {
4
4
  message1: {
5
- type: "message",
5
+ type: "Message",
6
6
  who: "world",
7
7
  },
8
8
  message2: {
9
- type: "message",
9
+ type: "Message",
10
10
  who: "wide",
11
11
  },
12
12
  message3: {
13
- type: "message",
13
+ type: "Message",
14
14
  who: "web",
15
15
  },
16
16
  }
@@ -1,12 +1,12 @@
1
1
  import { createStore, type TypesConfig } from "@inglorious/web"
2
2
 
3
3
  import type { AppEntity, AppState } from "../../types"
4
- import { message } from "../message/message"
4
+ import { Message } from "../types/message"
5
5
  import { entities } from "./entities"
6
6
  import { middlewares } from "./middlewares"
7
7
 
8
8
  export const store = createStore<AppEntity, AppState>({
9
- types: { message } as unknown as TypesConfig<AppEntity>,
9
+ types: { Message } as unknown as TypesConfig<AppEntity>,
10
10
  entities,
11
11
  middlewares,
12
12
  })
@@ -2,7 +2,7 @@ import { html } from "@inglorious/web"
2
2
 
3
3
  import type { MessageType } from "../../types"
4
4
 
5
- export const message: MessageType = {
5
+ export const Message: MessageType = {
6
6
  click(entity) {
7
7
  entity.isUpperCase = !entity.isUpperCase
8
8
  },
@@ -4,7 +4,7 @@ import { BaseEntity, EntitiesState } from "@inglorious/web"
4
4
 
5
5
  // Define your entity types
6
6
  export interface MessageEntity extends BaseEntity {
7
- type: "message"
7
+ type: "Message"
8
8
  id?: string
9
9
  who: string
10
10
  isUpperCase?: boolean
@@ -13,7 +13,13 @@ export default defineConfig({
13
13
  // @see https://github.com/vitejs/vite/issues/1973
14
14
  define: { "process.env": {} },
15
15
 
16
- plugins: [minifyTemplateLiterals(), ViteImageOptimizer()],
16
+ plugins: [ViteImageOptimizer()],
17
+
18
+ build: {
19
+ rollupOptions: {
20
+ plugins: [minifyTemplateLiterals()],
21
+ },
22
+ },
17
23
 
18
24
  resolve: {
19
25
  alias: {
@@ -1,9 +1,16 @@
1
- export const app = {
2
- render() {
1
+ /* eslint-disable @typescript-eslint/no-unused-vars */
2
+ import type { Api } from "@inglorious/web"
3
+
4
+ import { Message } from "./types/message"
5
+
6
+ export const App = {
7
+ render(props: Record<string, unknown> | null, api: Api) {
3
8
  return (
4
9
  <h1>
5
10
  {/* @ts-expect-error - JSX components are entity type names, not imports */}
6
- <Message1 />, <Message2 />, <Message3 />!
11
+ <Message entityId="message1" />, <Message entityId="message2" />,{" "}
12
+ {/* @ts-expect-error - JSX components are entity type names, not imports */}
13
+ <Message entityId="message3" />!
7
14
  </h1>
8
15
  )
9
16
  },
@@ -1,6 +1,6 @@
1
1
  import { mount } from "@inglorious/web"
2
2
 
3
- import { app } from "./app"
3
+ import { App } from "./app"
4
4
  import { store } from "./store"
5
5
 
6
- mount(store, app.render, document.getElementById("root")!)
6
+ mount(store, (api) => App.render(null, api), document.getElementById("root")!)
@@ -2,15 +2,15 @@ import type { AppState } from "../../types"
2
2
 
3
3
  export const entities: AppState = {
4
4
  message1: {
5
- type: "message",
5
+ type: "Message",
6
6
  who: "world",
7
7
  },
8
8
  message2: {
9
- type: "message",
9
+ type: "Message",
10
10
  who: "wide",
11
11
  },
12
12
  message3: {
13
- type: "message",
13
+ type: "Message",
14
14
  who: "web",
15
15
  },
16
16
  }
@@ -1,12 +1,12 @@
1
1
  import { createStore, type TypesConfig } from "@inglorious/web"
2
2
 
3
3
  import type { AppEntity, AppState } from "../../types"
4
- import { message } from "../message/message"
4
+ import { Message } from "../types/message"
5
5
  import { entities } from "./entities"
6
6
  import { middlewares } from "./middlewares"
7
7
 
8
8
  export const store = createStore<AppEntity, AppState>({
9
- types: { message } as unknown as TypesConfig<AppEntity>,
9
+ types: { Message } as unknown as TypesConfig<AppEntity>,
10
10
  entities,
11
11
  middlewares,
12
12
  })
@@ -1,6 +1,6 @@
1
1
  import type { MessageType } from "../../types"
2
2
 
3
- export const message: MessageType = {
3
+ export const Message: MessageType = {
4
4
  click(entity) {
5
5
  entity.isUpperCase = !entity.isUpperCase
6
6
  },
@@ -4,7 +4,7 @@ import { Api, BaseEntity, EntitiesState, TemplateResult } from "@inglorious/web"
4
4
 
5
5
  // Define your entity types
6
6
  export interface MessageEntity extends BaseEntity {
7
- type: "message"
7
+ type: "Message"
8
8
  id?: string
9
9
  who: string
10
10
  isUpperCase?: boolean
@@ -14,7 +14,13 @@ export default defineConfig({
14
14
  // @see https://github.com/vitejs/vite/issues/1973
15
15
  define: { "process.env": {} },
16
16
 
17
- plugins: [minifyTemplateLiterals(), ViteImageOptimizer(), jsx()],
17
+ plugins: [ViteImageOptimizer(), jsx()],
18
+
19
+ build: {
20
+ rollupOptions: {
21
+ plugins: [minifyTemplateLiterals()],
22
+ },
23
+ },
18
24
 
19
25
  resolve: {
20
26
  alias: {
@@ -1,3 +1,10 @@
1
+ <script>
2
+ import { Message } from "./types/message.vue"
3
+ </script>
4
+
1
5
  <template>
2
- <h1><Message1 />, <Message2 />, <Message3 />!</h1>
6
+ <h1>
7
+ <Message v-bind="message1" />, <Message v-bind="message2" />,
8
+ <Message v-bind="message3" />!
9
+ </h1>
3
10
  </template>
@@ -1,7 +1,7 @@
1
1
  import { mount } from "@inglorious/web"
2
2
 
3
3
  // @ts-expect-error - Handled by @inglorious/vite-plugin-vue
4
- import { app } from "./app.vue"
4
+ import { App } from "./app.vue"
5
5
  import { store } from "./store"
6
6
 
7
- mount(store, (api) => app.render(null, api), document.getElementById("root"))
7
+ mount(store, (api) => App.render(null, api), document.getElementById("root"))
@@ -2,15 +2,15 @@ import type { AppState } from "../../types"
2
2
 
3
3
  export const entities: AppState = {
4
4
  message1: {
5
- type: "message",
5
+ type: "Message",
6
6
  who: "world",
7
7
  },
8
8
  message2: {
9
- type: "message",
9
+ type: "Message",
10
10
  who: "wide",
11
11
  },
12
12
  message3: {
13
- type: "message",
13
+ type: "Message",
14
14
  who: "web",
15
15
  },
16
16
  }
@@ -2,12 +2,12 @@ import { createStore, type TypesConfig } from "@inglorious/web"
2
2
 
3
3
  import type { AppEntity, AppState } from "../../types"
4
4
  // @ts-expect-error - Handled by @inglorious/vite-plugin-vue
5
- import { message } from "../message/message.vue"
5
+ import { Message } from "../message/message.vue"
6
6
  import { entities } from "./entities"
7
7
  import { middlewares } from "./middlewares"
8
8
 
9
9
  export const store = createStore<AppEntity, AppState>({
10
- types: { message } as unknown as TypesConfig<AppEntity>,
10
+ types: { Message } as unknown as TypesConfig<AppEntity>,
11
11
  entities,
12
12
  middlewares,
13
13
  })
@@ -4,7 +4,7 @@ import { Api, BaseEntity, EntitiesState, TemplateResult } from "@inglorious/web"
4
4
 
5
5
  // Define your entity types
6
6
  export interface MessageEntity extends BaseEntity {
7
- type: "message"
7
+ type: "Message"
8
8
  id?: string
9
9
  who: string
10
10
  isUpperCase?: boolean
@@ -14,7 +14,13 @@ export default defineConfig({
14
14
  // @see https://github.com/vitejs/vite/issues/1973
15
15
  define: { "process.env": {} },
16
16
 
17
- plugins: [minifyTemplateLiterals(), ViteImageOptimizer(), vue()],
17
+ plugins: [ViteImageOptimizer(), vue()],
18
+
19
+ build: {
20
+ rollupOptions: {
21
+ plugins: [minifyTemplateLiterals()],
22
+ },
23
+ },
18
24
 
19
25
  resolve: {
20
26
  alias: {
@@ -1,10 +1,10 @@
1
+ <script>
2
+ const click = (entity) => (entity.isUpperCase = !entity.isUpperCase)
3
+ </script>
4
+
1
5
  <template>
2
6
  <span @click="click"
3
7
  >Hello
4
8
  {{ entity.isUpperCase ? entity.who.toUpperCase() : entity.who }}</span
5
9
  >
6
10
  </template>
7
-
8
- <script>
9
- const click = (entity) => (entity.isUpperCase = !entity.isUpperCase)
10
- </script>
@@ -1,10 +1,10 @@
1
+ <script>
2
+ const click = (entity) => (entity.isUpperCase = !entity.isUpperCase)
3
+ </script>
4
+
1
5
  <template>
2
6
  <span @click="click"
3
7
  >Hello
4
8
  {{ entity.isUpperCase ? entity.who.toUpperCase() : entity.who }}</span
5
9
  >
6
10
  </template>
7
-
8
- <script>
9
- const click = (entity) => (entity.isUpperCase = !entity.isUpperCase)
10
- </script>