@inglorious/create-app 1.1.2 → 1.2.0

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 (45) hide show
  1. package/README.md +15 -7
  2. package/bin/index.js +34 -39
  3. package/bin/lib/app-jsx.js +280 -0
  4. package/bin/lib/app-lit.js +275 -0
  5. package/bin/lib/app-vue.js +239 -0
  6. package/bin/lib/app.js +402 -0
  7. package/bin/lib/cli.js +31 -0
  8. package/bin/lib/constants.js +3 -3
  9. package/bin/lib/features.js +142 -0
  10. package/bin/lib/imports.js +64 -0
  11. package/bin/lib/mobile.js +19 -1
  12. package/bin/lib/pwa.js +50 -4
  13. package/bin/lib/questions.js +184 -0
  14. package/bin/lib/source.js +58 -0
  15. package/package.json +3 -3
  16. package/templates/js/package.json +4 -4
  17. package/templates/js/vite.config.js +2 -1
  18. package/templates/js-jsx/package.json +4 -4
  19. package/templates/js-jsx/vite.config.js +2 -1
  20. package/templates/js-vue/package.json +4 -4
  21. package/templates/js-vue/vite.config.js +2 -1
  22. package/templates/ssx-js/package.json +8 -7
  23. package/templates/ssx-js/src/site.config.js +2 -1
  24. package/templates/ssx-ts/package.json +9 -7
  25. package/templates/ssx-ts/src/site.config.ts +1 -0
  26. package/templates/ts/package.json +7 -6
  27. package/templates/ts/src/app.ts +4 -2
  28. package/templates/ts/tsconfig.app.json +2 -0
  29. package/templates/ts/tsconfig.node.json +2 -0
  30. package/templates/ts/types/index.d.ts +4 -1
  31. package/templates/ts/vite.config.ts +2 -1
  32. package/templates/ts-jsx/package.json +7 -6
  33. package/templates/ts-jsx/src/app.tsx +2 -2
  34. package/templates/ts-jsx/tsconfig.app.json +2 -0
  35. package/templates/ts-jsx/tsconfig.node.json +2 -0
  36. package/templates/ts-jsx/types/index.d.ts +3 -1
  37. package/templates/ts-jsx/types/vite-end.d.ts +1 -0
  38. package/templates/ts-jsx/vite.config.ts +2 -1
  39. package/templates/ts-vue/eslint.config.ts +1 -1
  40. package/templates/ts-vue/package.json +7 -6
  41. package/templates/ts-vue/src/store/middlewares.ts +5 -2
  42. package/templates/ts-vue/tsconfig.app.json +2 -0
  43. package/templates/ts-vue/tsconfig.node.json +2 -0
  44. package/templates/ts-vue/types/index.d.ts +3 -1
  45. package/templates/ts-vue/vite.config.ts +2 -1
@@ -1,9 +1,11 @@
1
1
  {
2
2
  "extends": "./tsconfig.json",
3
3
  "compilerOptions": {
4
+ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
4
5
  "module": "ESNext",
5
6
  "moduleResolution": "bundler",
6
7
  "target": "ES2020",
8
+ "noEmit": true,
7
9
  "verbatimModuleSyntax": true,
8
10
  "jsx": "preserve"
9
11
  },
@@ -1,8 +1,10 @@
1
1
  {
2
2
  "compilerOptions": {
3
3
  "composite": true,
4
+ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
4
5
  "module": "ESNext",
5
6
  "moduleResolution": "bundler",
7
+ "noEmit": true,
6
8
  "types": ["node"],
7
9
  "skipLibCheck": true
8
10
  },
@@ -21,8 +21,10 @@ export interface AppState extends EntitiesState<AppEntity> {
21
21
  message3: MessageEntity
22
22
  }
23
23
 
24
+ export type AppApi = Api<AppEntity, AppState>
25
+
24
26
  // Types configuration
25
27
  export interface MessageType {
26
28
  click: (entity: MessageEntity) => void
27
- render: (entity: MessageEntity, api: Api) => TemplateResult | null
29
+ render: (entity: MessageEntity, api: AppApi) => TemplateResult | null
28
30
  }
@@ -1 +1,2 @@
1
1
  /// <reference types="vite/client" />
2
+ /// <reference types="@inglorious/jsx/jsx-runtime" />
@@ -1,6 +1,7 @@
1
1
  import path from "node:path"
2
2
  import { fileURLToPath } from "node:url"
3
3
 
4
+ import { hmr } from "@inglorious/vite-plugin-hmr"
4
5
  import { jsx } from "@inglorious/vite-plugin-jsx"
5
6
  import { minifyTemplateLiterals } from "rollup-plugin-minify-template-literals"
6
7
  import { defineConfig } from "vite"
@@ -14,7 +15,7 @@ export default defineConfig({
14
15
  // @see https://github.com/vitejs/vite/issues/1973
15
16
  define: { "process.env": {} },
16
17
 
17
- plugins: [ViteImageOptimizer(), jsx()],
18
+ plugins: [ViteImageOptimizer(), jsx(), hmr()],
18
19
 
19
20
  build: {
20
21
  rollupOptions: {
@@ -7,7 +7,7 @@ export default defineConfig([
7
7
  ...typescriptConfig,
8
8
 
9
9
  {
10
- files: ["**/*.ts", "**/*.vue"],
10
+ files: ["**/*.ts"],
11
11
  languageOptions: {
12
12
  parserOptions: {
13
13
  project: ["./tsconfig.app.json", "./tsconfig.node.json"],
@@ -21,14 +21,15 @@
21
21
  "@inglorious/eslint-config": "workspace:*",
22
22
  "@inglorious/vite-plugin-hmr": "workspace:*",
23
23
  "@inglorious/vite-plugin-vue": "workspace:*",
24
- "@types/node": "^25.0.9",
25
- "eslint": "^10.9.1",
26
- "prettier": "^3.9.6",
24
+ "@types/node": "^22.20.5",
25
+ "eslint": "^10.13.0",
26
+ "jiti": "^2.7.0",
27
+ "prettier": "^3.9.10",
27
28
  "rollup-plugin-minify-template-literals": "^2.2.0",
28
- "sharp": "^0.35.4",
29
+ "sharp": "^0.35.5",
29
30
  "svgo": "^4.1.0",
30
- "typescript": "^5.9.2",
31
- "vite": "^8.2.2",
31
+ "typescript": "^7.0.2",
32
+ "vite": "^8.3.4",
32
33
  "vite-plugin-image-optimizer": "^2.0.3"
33
34
  },
34
35
  "packageManager": "pnpm@10.15.0",
@@ -1,7 +1,10 @@
1
+ import type { Middleware } from "@inglorious/store"
1
2
  import { createDevtools } from "@inglorious/store/client/devtools"
2
3
 
3
- export const middlewares = []
4
+ import type { AppEntity, AppState } from "../../types"
5
+
6
+ export const middlewares: Middleware<AppEntity, AppState>[] = []
4
7
 
5
8
  if (import.meta.env.DEV) {
6
- middlewares.push(createDevtools().middleware)
9
+ middlewares.push(createDevtools<AppEntity, AppState>().middleware)
7
10
  }
@@ -1,9 +1,11 @@
1
1
  {
2
2
  "extends": "./tsconfig.json",
3
3
  "compilerOptions": {
4
+ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
4
5
  "module": "ESNext",
5
6
  "moduleResolution": "bundler",
6
7
  "target": "ES2020",
8
+ "noEmit": true,
7
9
  "verbatimModuleSyntax": true
8
10
  },
9
11
  "include": ["src"]
@@ -1,8 +1,10 @@
1
1
  {
2
2
  "compilerOptions": {
3
3
  "composite": true,
4
+ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
4
5
  "module": "ESNext",
5
6
  "moduleResolution": "bundler",
7
+ "noEmit": true,
6
8
  "types": ["node"],
7
9
  "skipLibCheck": true
8
10
  },
@@ -21,8 +21,10 @@ export interface AppState extends EntitiesState<AppEntity> {
21
21
  message3: MessageEntity
22
22
  }
23
23
 
24
+ export type AppApi = Api<AppEntity, AppState>
25
+
24
26
  // Types configuration
25
27
  export interface MessageType {
26
28
  click: (entity: MessageEntity) => void
27
- render: (entity: MessageEntity, api: Api) => TemplateResult | null
29
+ render: (entity: MessageEntity, api: AppApi) => TemplateResult | null
28
30
  }
@@ -1,6 +1,7 @@
1
1
  import path from "node:path"
2
2
  import { fileURLToPath } from "node:url"
3
3
 
4
+ import { hmr } from "@inglorious/vite-plugin-hmr"
4
5
  import { vue } from "@inglorious/vite-plugin-vue"
5
6
  import { minifyTemplateLiterals } from "rollup-plugin-minify-template-literals"
6
7
  import { defineConfig } from "vite"
@@ -14,7 +15,7 @@ export default defineConfig({
14
15
  // @see https://github.com/vitejs/vite/issues/1973
15
16
  define: { "process.env": {} },
16
17
 
17
- plugins: [ViteImageOptimizer(), vue()],
18
+ plugins: [ViteImageOptimizer(), vue(), hmr()],
18
19
 
19
20
  build: {
20
21
  rollupOptions: {