@inglorious/create-app 1.7.0 → 1.7.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 (2) hide show
  1. package/bin/lib/app.js +7 -7
  2. package/package.json +1 -1
package/bin/lib/app.js CHANGED
@@ -129,11 +129,6 @@ function mainSource(app) {
129
129
  }
130
130
  }
131
131
  imports.push('import "./app.css"')
132
- if (app.transitions) {
133
- imports.push(
134
- 'import { withTransitions } from "@inglorious/ui/view-transitions"',
135
- )
136
- }
137
132
  imports.push(
138
133
  'import { mount } from "@inglorious/web"',
139
134
  componentImport(app, "App", "./app"),
@@ -142,7 +137,7 @@ function mainSource(app) {
142
137
  if (app.i18n) imports.push('import { ready } from "./i18n"')
143
138
 
144
139
  const args = [
145
- app.transitions ? "withTransitions(store)" : "store",
140
+ "store",
146
141
  "(api) => App.render(null, api)",
147
142
  app.isTypeScript
148
143
  ? 'document.getElementById("root")!'
@@ -233,6 +228,11 @@ function storeSource(app) {
233
228
  'import { entities } from "./entities"',
234
229
  'import { middlewares } from "./middlewares"',
235
230
  ]
231
+ if (app.transitions) {
232
+ imports.push(
233
+ 'import { withTransitions } from "@inglorious/ui/view-transitions"',
234
+ )
235
+ }
236
236
  if (app.routing) {
237
237
  imports.push(
238
238
  'import { Router, setRoutes } from "@inglorious/web/router"',
@@ -262,7 +262,7 @@ ${app.routing ? "\nsetRoutes(routes)\n" : ""}
262
262
  export const store = createStore${generics}({
263
263
  ${typesValue}
264
264
  entities,
265
- middlewares,
265
+ middlewares: ${app.transitions ? "[withTransitions(), ...middlewares]" : "middlewares"},
266
266
  // Creates an entity for each type that has none: ${singletons(app).join(", ")}.
267
267
  autoCreateEntities: true,
268
268
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inglorious/create-app",
3
- "version": "1.7.0",
3
+ "version": "1.7.1",
4
4
  "description": "A scaffolding tool to quickly create a new app with Inglorious Web.",
5
5
  "author": "Matteo Antony Mistretta <antony.mistretta@gmail.com> (https://ingloriouscoderz.it)",
6
6
  "license": "MIT",