@inglorious/create-app 0.3.2 → 0.3.3
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.
- package/package.json +1 -1
- package/templates/ssx-js/gitignore +3 -3
- package/templates/ssx-ts/gitignore +3 -3
- package/templates/ts/eslint.config.ts +17 -0
- package/templates/ts/package.json +4 -4
- package/templates/ts/src/main.ts +1 -1
- package/templates/ts/src/message/message.ts +5 -5
- package/templates/ts/src/store/index.ts +1 -2
- package/templates/ts/src/store/middlewares.ts +1 -2
- package/templates/ts/tsconfig.app.json +4 -0
- package/templates/ts/tsconfig.json +5 -21
- package/templates/ts/tsconfig.node.json +10 -0
- package/templates/ts/types/index.d.ts +6 -5
- package/templates/ts/types/vite-end.d.ts +1 -0
- package/templates/ts/eslint.config.js +0 -1
- /package/templates/ts/{vite.config.js → vite.config.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inglorious/create-app",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
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,3 +1,3 @@
|
|
|
1
|
-
node_modules
|
|
2
|
-
dist
|
|
3
|
-
.DS_Store
|
|
1
|
+
node_modules
|
|
2
|
+
dist
|
|
3
|
+
.DS_Store
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
node_modules
|
|
2
|
-
dist
|
|
3
|
-
.DS_Store
|
|
1
|
+
node_modules
|
|
2
|
+
dist
|
|
3
|
+
.DS_Store
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import browserConfig from "@inglorious/eslint-config/browser"
|
|
2
|
+
import typescriptConfig from "@inglorious/eslint-config/typescript"
|
|
3
|
+
import { defineConfig } from "eslint/config"
|
|
4
|
+
|
|
5
|
+
export default defineConfig([
|
|
6
|
+
...browserConfig,
|
|
7
|
+
...typescriptConfig,
|
|
8
|
+
{
|
|
9
|
+
files: ["**/*.ts", "**/*.tsx"],
|
|
10
|
+
languageOptions: {
|
|
11
|
+
parserOptions: {
|
|
12
|
+
project: ["./tsconfig.app.json", "./tsconfig.node.json"],
|
|
13
|
+
tsconfigRootDir: import.meta.dirname,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
])
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
"author": "",
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"scripts": {
|
|
10
|
-
"format": "prettier --write
|
|
11
|
-
"lint": "eslint . --
|
|
10
|
+
"format": "prettier --write **/*.ts",
|
|
11
|
+
"lint": "eslint . --report-unused-disable-directives --max-warnings 0",
|
|
12
12
|
"dev": "vite",
|
|
13
13
|
"build": "vite build",
|
|
14
14
|
"preview": "vite preview"
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"sharp": "^0.34.5",
|
|
25
25
|
"svgo": "^4.0.0",
|
|
26
26
|
"typescript": "^5.9.2",
|
|
27
|
-
"vite
|
|
28
|
-
"vite": "^
|
|
27
|
+
"vite": "^7.1.6",
|
|
28
|
+
"vite-plugin-image-optimizer": "^2.0.3"
|
|
29
29
|
},
|
|
30
30
|
"packageManager": "pnpm@10.15.0",
|
|
31
31
|
"engines": {
|
package/templates/ts/src/main.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { html } from "@inglorious/web"
|
|
2
2
|
|
|
3
|
-
import type {
|
|
3
|
+
import type { MessageType } from "../../types"
|
|
4
4
|
|
|
5
|
-
export const message = {
|
|
6
|
-
click(entity
|
|
5
|
+
export const message: MessageType = {
|
|
6
|
+
click(entity) {
|
|
7
7
|
entity.isUpperCase = !entity.isUpperCase
|
|
8
8
|
},
|
|
9
9
|
|
|
10
|
-
render(entity
|
|
10
|
+
render(entity, api) {
|
|
11
11
|
const message = entity.isUpperCase ? entity.who.toUpperCase() : entity.who
|
|
12
12
|
return html`<span @click=${() => api.notify(`#${entity.id}:click`)}
|
|
13
13
|
>Hello ${message}</span
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import { createStore } from "@inglorious/web"
|
|
1
|
+
import { createStore, type TypesConfig } from "@inglorious/web"
|
|
3
2
|
|
|
4
3
|
import type { AppEntity, AppState } from "../../types"
|
|
5
4
|
import { message } from "../message/message"
|
|
@@ -1,23 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
"skipLibCheck": true,
|
|
8
|
-
|
|
9
|
-
/* Bundler mode */
|
|
10
|
-
"moduleResolution": "bundler",
|
|
11
|
-
"allowImportingTsExtensions": true,
|
|
12
|
-
"resolveJsonModule": true,
|
|
13
|
-
"isolatedModules": true,
|
|
14
|
-
"noEmit": true,
|
|
15
|
-
|
|
16
|
-
/* Linting */
|
|
17
|
-
"strict": true,
|
|
18
|
-
"noUnusedLocals": true,
|
|
19
|
-
"noUnusedParameters": true,
|
|
20
|
-
"noFallthroughCasesInSwitch": true
|
|
21
|
-
},
|
|
22
|
-
"include": ["src"]
|
|
2
|
+
"files": [],
|
|
3
|
+
"references": [
|
|
4
|
+
{ "path": "./tsconfig.app.json" },
|
|
5
|
+
{ "path": "./tsconfig.node.json" }
|
|
6
|
+
]
|
|
23
7
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "./vite-end"
|
|
2
|
+
|
|
3
|
+
import { BaseEntity, EntitiesState } from "@inglorious/web"
|
|
2
4
|
|
|
3
5
|
// Define your entity types
|
|
4
6
|
export interface MessageEntity extends BaseEntity {
|
|
@@ -19,8 +21,7 @@ export interface AppState extends EntitiesState<AppEntity> {
|
|
|
19
21
|
}
|
|
20
22
|
|
|
21
23
|
// Types configuration
|
|
22
|
-
export interface
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
24
|
+
export interface MessageType {
|
|
25
|
+
click: (entity: MessageEntity) => void
|
|
26
|
+
render: (entity: MessageEntity, api: Api) => TemplateResult | null
|
|
26
27
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "@inglorious/eslint-config/browser"
|
|
File without changes
|