@inglorious/create-app 0.3.1 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inglorious/create-app",
3
- "version": "0.3.1",
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
@@ -1,4 +1,4 @@
1
- import { SiteConfig } from "@inglorious/ssx"
1
+ import type { SiteConfig } from "@inglorious/ssx"
2
2
 
3
3
  const siteConfig: SiteConfig = {
4
4
  title: "My SSX App",
@@ -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 '**/*.ts'",
11
- "lint": "eslint . --ext ts --report-unused-disable-directives --max-warnings 0",
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-plugin-image-optimizer": "^2.0.3",
28
- "vite": "^7.1.6"
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": {
@@ -3,4 +3,4 @@ import { mount } from "@inglorious/web"
3
3
  import { app } from "./app"
4
4
  import { store } from "./store"
5
5
 
6
- mount(store, app.render, document.getElementById("root"))
6
+ mount(store, app.render, document.getElementById("root")!)
@@ -1,13 +1,13 @@
1
- import { type Api, html } from "@inglorious/web"
1
+ import { html } from "@inglorious/web"
2
2
 
3
- import type { MessageEntity } from "../../types"
3
+ import type { MessageType } from "../../types"
4
4
 
5
- export const message = {
6
- click(entity: MessageEntity) {
5
+ export const message: MessageType = {
6
+ click(entity) {
7
7
  entity.isUpperCase = !entity.isUpperCase
8
8
  },
9
9
 
10
- render(entity: MessageEntity, api: Api) {
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 { TypesConfig } from "@inglorious/store"
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,5 +1,4 @@
1
- import type { Middleware } from "@inglorious/store"
2
- import { createDevtools } from "@inglorious/web"
1
+ import { createDevtools, type Middleware } from "@inglorious/web"
3
2
 
4
3
  import type { AppEntity, AppState } from "../../types"
5
4
 
@@ -0,0 +1,4 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "include": ["src"]
4
+ }
@@ -1,23 +1,7 @@
1
1
  {
2
- "compilerOptions": {
3
- "target": "ESNext",
4
- "useDefineForClassFields": true,
5
- "module": "ESNext",
6
- "lib": ["ESNext", "DOM", "DOM.Iterable"],
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
  }
@@ -0,0 +1,10 @@
1
+ {
2
+ "compilerOptions": {
3
+ "composite": true,
4
+ "module": "ESNext",
5
+ "moduleResolution": "bundler",
6
+ "types": ["node"],
7
+ "skipLibCheck": true
8
+ },
9
+ "include": ["vite.config.ts", "eslint.config.ts"]
10
+ }
@@ -1,4 +1,6 @@
1
- import { BaseEntity, EntitiesState } from "@inglorious/store"
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 AppTypes {
23
- message: {
24
- click: (entity: MessageEntity) => void
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