@inglorious/create-app 0.3.5 → 0.5.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.
- package/LICENSE +9 -9
- package/bin/index.js +49 -4
- package/package.json +1 -1
- package/templates/js/LICENSE +9 -9
- package/templates/js/gitignore +49 -49
- package/templates/js-jsx/.prettierrc.yml +1 -0
- package/templates/js-jsx/LICENSE +9 -0
- package/templates/js-jsx/README.md +29 -0
- package/templates/js-jsx/eslint.config.js +13 -0
- package/templates/js-jsx/gitignore +49 -0
- package/templates/js-jsx/index.html +15 -0
- package/templates/js-jsx/package.json +34 -0
- package/templates/js-jsx/public/logo.png +0 -0
- package/templates/js-jsx/public/style.css +7 -0
- package/templates/js-jsx/src/app.jsx +9 -0
- package/templates/js-jsx/src/main.js +6 -0
- package/templates/js-jsx/src/message/message.jsx +14 -0
- package/templates/js-jsx/src/store/entities.js +14 -0
- package/templates/js-jsx/src/store/index.js +11 -0
- package/templates/js-jsx/src/store/middlewares.js +7 -0
- package/templates/js-jsx/vite.config.js +21 -0
- package/templates/js-vue/.prettierrc.yml +1 -0
- package/templates/js-vue/LICENSE +9 -0
- package/templates/js-vue/README.md +29 -0
- package/templates/js-vue/eslint.config.js +1 -0
- package/templates/js-vue/gitignore +49 -0
- package/templates/js-vue/index.html +15 -0
- package/templates/js-vue/package.json +34 -0
- package/templates/js-vue/public/logo.png +0 -0
- package/templates/js-vue/public/style.css +7 -0
- package/templates/js-vue/src/app.vue +3 -0
- package/templates/js-vue/src/main.js +6 -0
- package/templates/js-vue/src/message/message.vue +10 -0
- package/templates/js-vue/src/store/entities.js +14 -0
- package/templates/js-vue/src/store/index.js +11 -0
- package/templates/js-vue/src/store/middlewares.js +7 -0
- package/templates/js-vue/vite.config.js +21 -0
- package/templates/minimal/LICENSE +9 -9
- package/templates/minimal/gitignore +6 -6
- package/templates/ssx-js/gitignore +3 -3
- package/templates/ssx-ts/gitignore +3 -3
- package/templates/ts/LICENSE +9 -9
- package/templates/ts/gitignore +49 -49
- package/templates/ts/index.html +1 -1
- package/templates/ts-jsx/.prettierrc.yml +1 -0
- package/templates/ts-jsx/LICENSE +9 -0
- package/templates/ts-jsx/README.md +30 -0
- package/templates/ts-jsx/eslint.config.ts +25 -0
- package/templates/ts-jsx/gitignore +49 -0
- package/templates/ts-jsx/index.html +15 -0
- package/templates/ts-jsx/package.json +37 -0
- package/templates/ts-jsx/public/logo.png +0 -0
- package/templates/ts-jsx/public/style.css +7 -0
- package/templates/ts-jsx/src/app.tsx +10 -0
- package/templates/ts-jsx/src/main.ts +6 -0
- package/templates/ts-jsx/src/message/message.tsx +16 -0
- package/templates/ts-jsx/src/store/entities.ts +16 -0
- package/templates/ts-jsx/src/store/index.ts +12 -0
- package/templates/ts-jsx/src/store/middlewares.ts +9 -0
- package/templates/ts-jsx/tsconfig.app.json +11 -0
- package/templates/ts-jsx/tsconfig.json +7 -0
- package/templates/ts-jsx/tsconfig.node.json +10 -0
- package/templates/ts-jsx/types/index.d.ts +27 -0
- package/templates/ts-jsx/types/vite-end.d.ts +1 -0
- package/templates/ts-jsx/vite.config.ts +24 -0
- package/templates/ts-vue/.prettierrc.yml +1 -0
- package/templates/ts-vue/LICENSE +9 -0
- package/templates/ts-vue/README.md +29 -0
- package/templates/ts-vue/eslint.config.ts +18 -0
- package/templates/ts-vue/gitignore +49 -0
- package/templates/ts-vue/index.html +15 -0
- package/templates/ts-vue/package.json +36 -0
- package/templates/ts-vue/public/logo.png +0 -0
- package/templates/ts-vue/public/style.css +7 -0
- package/templates/ts-vue/src/app.vue +3 -0
- package/templates/ts-vue/src/main.ts +7 -0
- package/templates/ts-vue/src/message/message.vue +10 -0
- package/templates/ts-vue/src/store/entities.ts +16 -0
- package/templates/ts-vue/src/store/index.ts +13 -0
- package/templates/ts-vue/src/store/middlewares.ts +7 -0
- package/templates/ts-vue/tsconfig.app.json +10 -0
- package/templates/ts-vue/tsconfig.json +7 -0
- package/templates/ts-vue/tsconfig.node.json +10 -0
- package/templates/ts-vue/types/index.d.ts +27 -0
- package/templates/ts-vue/types/vite-end.d.ts +1 -0
- package/templates/ts-vue/vite.config.ts +24 -0
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
{
|
|
10
|
+
files: ["**/*.ts", "**/*.vue"],
|
|
11
|
+
languageOptions: {
|
|
12
|
+
parserOptions: {
|
|
13
|
+
project: ["./tsconfig.app.json", "./tsconfig.node.json"],
|
|
14
|
+
tsconfigRootDir: import.meta.dirname,
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
])
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Dependencies
|
|
2
|
+
node_modules
|
|
3
|
+
.pnp
|
|
4
|
+
.pnp.js
|
|
5
|
+
|
|
6
|
+
# Local env files
|
|
7
|
+
.env
|
|
8
|
+
.env.local
|
|
9
|
+
.env.development.local
|
|
10
|
+
.env.test.local
|
|
11
|
+
.env.production.local
|
|
12
|
+
|
|
13
|
+
# Testing
|
|
14
|
+
coverage
|
|
15
|
+
|
|
16
|
+
# Turbo
|
|
17
|
+
.turbo
|
|
18
|
+
|
|
19
|
+
# Vercel
|
|
20
|
+
.vercel
|
|
21
|
+
|
|
22
|
+
# Build Outputs
|
|
23
|
+
.next/
|
|
24
|
+
out/
|
|
25
|
+
build
|
|
26
|
+
dist
|
|
27
|
+
dist-ssr
|
|
28
|
+
storybook-static
|
|
29
|
+
vite.config.js.timestamp-*
|
|
30
|
+
|
|
31
|
+
# Debug
|
|
32
|
+
logs
|
|
33
|
+
*.log
|
|
34
|
+
npm-debug.log*
|
|
35
|
+
yarn-debug.log*
|
|
36
|
+
yarn-error.log*
|
|
37
|
+
pnpm-debug.log*
|
|
38
|
+
lerna-debug.log*
|
|
39
|
+
|
|
40
|
+
# Editor directories and files
|
|
41
|
+
.vscode/*
|
|
42
|
+
.idea
|
|
43
|
+
.DS_Store
|
|
44
|
+
*.suo
|
|
45
|
+
*.ntvs*
|
|
46
|
+
*.njsproj
|
|
47
|
+
*.sln
|
|
48
|
+
*.sw?
|
|
49
|
+
.qodo
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<link rel="icon" type="image/svg+xml" href="/logo.png" />
|
|
7
|
+
<link rel="stylesheet" href="/style.css" />
|
|
8
|
+
<title>Inglorious App</title>
|
|
9
|
+
</head>
|
|
10
|
+
|
|
11
|
+
<body>
|
|
12
|
+
<div id="root"></div>
|
|
13
|
+
<script type="module" src="./src/main.ts"></script>
|
|
14
|
+
</body>
|
|
15
|
+
</html>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "js-template",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"private": true,
|
|
6
|
+
"description": "A new app created with @inglorious/create-app",
|
|
7
|
+
"author": "",
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"format": "prettier --write .",
|
|
11
|
+
"lint": "eslint .",
|
|
12
|
+
"dev": "vite",
|
|
13
|
+
"build": "vite build",
|
|
14
|
+
"preview": "vite preview"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@inglorious/web": "workspace:*"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@inglorious/eslint-config": "workspace:*",
|
|
21
|
+
"@inglorious/vite-plugin-vue": "workspace:*",
|
|
22
|
+
"@types/node": "^25.0.9",
|
|
23
|
+
"eslint": "^9.39.1",
|
|
24
|
+
"prettier": "^3.6.2",
|
|
25
|
+
"rollup-plugin-minify-template-literals": "^1.1.7",
|
|
26
|
+
"sharp": "^0.34.5",
|
|
27
|
+
"svgo": "^4.0.0",
|
|
28
|
+
"typescript": "^5.9.2",
|
|
29
|
+
"vite": "^7.1.6",
|
|
30
|
+
"vite-plugin-image-optimizer": "^2.0.3"
|
|
31
|
+
},
|
|
32
|
+
"packageManager": "pnpm@10.15.0",
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": ">= 22"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { AppState } from "../../types"
|
|
2
|
+
|
|
3
|
+
export const entities: AppState = {
|
|
4
|
+
message1: {
|
|
5
|
+
type: "message",
|
|
6
|
+
who: "world",
|
|
7
|
+
},
|
|
8
|
+
message2: {
|
|
9
|
+
type: "message",
|
|
10
|
+
who: "wide",
|
|
11
|
+
},
|
|
12
|
+
message3: {
|
|
13
|
+
type: "message",
|
|
14
|
+
who: "web",
|
|
15
|
+
},
|
|
16
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createStore, type TypesConfig } from "@inglorious/web"
|
|
2
|
+
|
|
3
|
+
import type { AppEntity, AppState } from "../../types"
|
|
4
|
+
// @ts-expect-error - Handled by @inglorious/vite-plugin-vue
|
|
5
|
+
import { message } from "../message/message.vue"
|
|
6
|
+
import { entities } from "./entities"
|
|
7
|
+
import { middlewares } from "./middlewares"
|
|
8
|
+
|
|
9
|
+
export const store = createStore<AppEntity, AppState>({
|
|
10
|
+
types: { message } as unknown as TypesConfig<AppEntity>,
|
|
11
|
+
entities,
|
|
12
|
+
middlewares,
|
|
13
|
+
})
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import "./vite-end"
|
|
2
|
+
|
|
3
|
+
import { Api, BaseEntity, EntitiesState, TemplateResult } from "@inglorious/web"
|
|
4
|
+
|
|
5
|
+
// Define your entity types
|
|
6
|
+
export interface MessageEntity extends BaseEntity {
|
|
7
|
+
type: "message"
|
|
8
|
+
id?: string
|
|
9
|
+
who: string
|
|
10
|
+
isUpperCase?: boolean
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// Union type of all entities
|
|
14
|
+
export type AppEntity = MessageEntity
|
|
15
|
+
|
|
16
|
+
// State type with known entity IDs
|
|
17
|
+
export interface AppState extends EntitiesState<AppEntity> {
|
|
18
|
+
message1: MessageEntity
|
|
19
|
+
message2: MessageEntity
|
|
20
|
+
message3: MessageEntity
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Types configuration
|
|
24
|
+
export interface MessageType {
|
|
25
|
+
click: (entity: MessageEntity) => void
|
|
26
|
+
render: (entity: MessageEntity, api: Api) => TemplateResult | null
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import path from "node:path"
|
|
2
|
+
import { fileURLToPath } from "node:url"
|
|
3
|
+
|
|
4
|
+
import { vue } from "@inglorious/vite-plugin-vue"
|
|
5
|
+
import { minifyTemplateLiterals } from "rollup-plugin-minify-template-literals"
|
|
6
|
+
import { defineConfig } from "vite"
|
|
7
|
+
import { ViteImageOptimizer } from "vite-plugin-image-optimizer"
|
|
8
|
+
|
|
9
|
+
const __filename = fileURLToPath(import.meta.url)
|
|
10
|
+
const __dirname = path.dirname(__filename)
|
|
11
|
+
|
|
12
|
+
// https://vite.dev/config/
|
|
13
|
+
export default defineConfig({
|
|
14
|
+
// @see https://github.com/vitejs/vite/issues/1973
|
|
15
|
+
define: { "process.env": {} },
|
|
16
|
+
|
|
17
|
+
plugins: [minifyTemplateLiterals(), ViteImageOptimizer(), vue()],
|
|
18
|
+
|
|
19
|
+
resolve: {
|
|
20
|
+
alias: {
|
|
21
|
+
"@": path.resolve(__dirname, "src"),
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
})
|