@inglorious/create-app 0.2.2 → 0.3.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/README.md +3 -1
- package/bin/index.js +10 -0
- package/package.json +1 -1
- package/templates/js/package.json +3 -0
- package/templates/js/vite.config.js +2 -1
- package/templates/ssx-js/.prettierrc.yml +1 -0
- package/templates/ssx-js/LICENSE +9 -0
- package/templates/ssx-js/eslint.config.js +1 -0
- package/templates/ssx-js/gitignore +3 -0
- package/templates/ssx-js/package.json +30 -0
- package/templates/ssx-js/public/logo.png +0 -0
- package/templates/ssx-js/public/style.css +7 -0
- package/templates/ssx-js/src/pages/about.js +0 -0
- package/templates/ssx-js/src/pages/index.js +19 -0
- package/templates/ssx-js/src/site.config.js +13 -0
- package/templates/ssx-ts/.prettierrc.yml +1 -0
- package/templates/ssx-ts/LICENSE +9 -0
- package/templates/ssx-ts/eslint.config.js +1 -0
- package/templates/ssx-ts/gitignore +3 -0
- package/templates/ssx-ts/package.json +30 -0
- package/templates/ssx-ts/public/logo.png +0 -0
- package/templates/ssx-ts/public/style.css +7 -0
- package/templates/ssx-ts/src/pages/about.ts +17 -0
- package/templates/ssx-ts/src/pages/index.ts +19 -0
- package/templates/ssx-ts/src/site.config.ts +16 -0
- package/templates/ssx-ts/tsconfig.json +23 -0
- package/templates/ts/package.json +3 -0
- package/templates/ts/tsconfig.json +10 -7
- package/templates/ts/vite.config.js +2 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://opensource.org/licenses/MIT)
|
|
4
4
|
|
|
5
|
-
The official scaffolding tool to quickly create a new web app with the [@inglorious/web](https://www.npmjs.com/package/@inglorious/web) framework.
|
|
5
|
+
The official scaffolding tool to quickly create a new web app with the [@inglorious/web](https://www.npmjs.com/package/@inglorious/web) framework or a static site with [@inglorious/ssx](https://www.npmjs.com/package/@inglorious/ssx).
|
|
6
6
|
|
|
7
7
|
This package allows you to generate a new project from a set of pre-configured templates, so you can start developing your web app right away.
|
|
8
8
|
|
|
@@ -30,6 +30,8 @@ The following templates are available to get you started:
|
|
|
30
30
|
- **minimal**: A minimal starter template that requires no bundling: just HTML, CSS, and JS.
|
|
31
31
|
- **js**: A starter template for a plain JavaScript project, bundled with Vite.
|
|
32
32
|
- **ts**: A starter template for a plain TypeScript project, bundled with Vite.
|
|
33
|
+
- **ssx-js**: A starter template for a Static Site Xecution (SSX) project using JavaScript.
|
|
34
|
+
- **ssx-ts**: A starter template for a Static Site Xecution (SSX) project using TypeScript.
|
|
33
35
|
|
|
34
36
|
## What it does
|
|
35
37
|
|
package/bin/index.js
CHANGED
|
@@ -49,6 +49,16 @@ async function main() {
|
|
|
49
49
|
description: "A TypeScript setup with Vite",
|
|
50
50
|
value: "ts",
|
|
51
51
|
},
|
|
52
|
+
{
|
|
53
|
+
title: "SSX (JavaScript)",
|
|
54
|
+
description: "Static Site Xecution with JavaScript",
|
|
55
|
+
value: "ssx-js",
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
title: "SSX (TypeScript)",
|
|
59
|
+
description: "Static Site Xecution with TypeScript",
|
|
60
|
+
value: "ssx-ts",
|
|
61
|
+
},
|
|
52
62
|
],
|
|
53
63
|
},
|
|
54
64
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inglorious/create-app",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
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",
|
|
@@ -3,13 +3,14 @@ import { fileURLToPath } from "node:url"
|
|
|
3
3
|
|
|
4
4
|
import { minifyTemplateLiterals } from "rollup-plugin-minify-template-literals"
|
|
5
5
|
import { defineConfig } from "vite"
|
|
6
|
+
import { ViteImageOptimizer } from "vite-plugin-image-optimizer"
|
|
6
7
|
|
|
7
8
|
const __filename = fileURLToPath(import.meta.url)
|
|
8
9
|
const __dirname = path.dirname(__filename)
|
|
9
10
|
|
|
10
11
|
// https://vite.dev/config/
|
|
11
12
|
export default defineConfig({
|
|
12
|
-
plugins: [minifyTemplateLiterals()],
|
|
13
|
+
plugins: [minifyTemplateLiterals(), ViteImageOptimizer()],
|
|
13
14
|
|
|
14
15
|
resolve: {
|
|
15
16
|
alias: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
semi: false
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright © 2025 Inglorious Coderz Srl.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "@inglorious/eslint-config/browser"
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ssx-js-template",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"private": true,
|
|
6
|
+
"description": "A new SSX app created with @inglorious/create-app",
|
|
7
|
+
"author": "",
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"format": "prettier --write '**/*.js'",
|
|
11
|
+
"lint": "eslint . --ext js --report-unused-disable-directives --max-warnings 0",
|
|
12
|
+
"dev": "ssx dev",
|
|
13
|
+
"build": "ssx build",
|
|
14
|
+
"preview": "serve dist"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@inglorious/ssx": "workspace:*",
|
|
18
|
+
"@inglorious/web": "workspace:*"
|
|
19
|
+
},
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"@inglorious/eslint-config": "workspace:*",
|
|
22
|
+
"eslint": "^9.39.1",
|
|
23
|
+
"prettier": "^3.6.2",
|
|
24
|
+
"serve": "^14.2.1"
|
|
25
|
+
},
|
|
26
|
+
"packageManager": "pnpm@10.15.0",
|
|
27
|
+
"engines": {
|
|
28
|
+
"node": ">= 22"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
Binary file
|
|
File without changes
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { html } from "@inglorious/web"
|
|
2
|
+
|
|
3
|
+
export const index = {
|
|
4
|
+
render() {
|
|
5
|
+
return html`
|
|
6
|
+
<div>
|
|
7
|
+
<h1>Welcome to SSX!</h1>
|
|
8
|
+
<p>Edit <code>src/pages/index.js</code> to get started.</p>
|
|
9
|
+
<nav>
|
|
10
|
+
<a href="/about">About</a>
|
|
11
|
+
</nav>
|
|
12
|
+
</div>
|
|
13
|
+
`
|
|
14
|
+
},
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const metadata = {
|
|
18
|
+
title: "Home",
|
|
19
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** @type {import('@inglorious/ssx/site.config').SiteConfig} */
|
|
2
|
+
export default {
|
|
3
|
+
title: "My SSX App",
|
|
4
|
+
meta: {
|
|
5
|
+
description: "Built with @inglorious/ssx",
|
|
6
|
+
},
|
|
7
|
+
// SSX includes image optimization by default
|
|
8
|
+
vite: {
|
|
9
|
+
server: {
|
|
10
|
+
port: 3000,
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
semi: false
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright © 2025 Inglorious Coderz Srl.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "@inglorious/eslint-config/browser"
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ssx-ts-template",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"private": true,
|
|
6
|
+
"description": "A new SSX app created with @inglorious/create-app",
|
|
7
|
+
"author": "",
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"format": "prettier --write '**/*.ts'",
|
|
11
|
+
"lint": "eslint . --ext ts --report-unused-disable-directives --max-warnings 0",
|
|
12
|
+
"dev": "ssx dev",
|
|
13
|
+
"build": "ssx build",
|
|
14
|
+
"preview": "serve dist"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@inglorious/ssx": "workspace:*",
|
|
18
|
+
"@inglorious/web": "workspace:*"
|
|
19
|
+
},
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"@inglorious/eslint-config": "workspace:*",
|
|
22
|
+
"eslint": "^9.39.1",
|
|
23
|
+
"prettier": "^3.6.2",
|
|
24
|
+
"serve": "^14.2.1"
|
|
25
|
+
},
|
|
26
|
+
"packageManager": "pnpm@10.15.0",
|
|
27
|
+
"engines": {
|
|
28
|
+
"node": ">= 22"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { html } from "@inglorious/web"
|
|
2
|
+
|
|
3
|
+
export const about = {
|
|
4
|
+
render() {
|
|
5
|
+
return html`
|
|
6
|
+
<div>
|
|
7
|
+
<h1>About</h1>
|
|
8
|
+
<p>This is a static page generated by SSX.</p>
|
|
9
|
+
<a href="/">Back Home</a>
|
|
10
|
+
</div>
|
|
11
|
+
`
|
|
12
|
+
},
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const metadata = {
|
|
16
|
+
title: "About",
|
|
17
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { html } from "@inglorious/web"
|
|
2
|
+
|
|
3
|
+
export const index = {
|
|
4
|
+
render() {
|
|
5
|
+
return html`
|
|
6
|
+
<div>
|
|
7
|
+
<h1>Welcome to SSX!</h1>
|
|
8
|
+
<p>Edit <code>src/pages/index.ts</code> to get started.</p>
|
|
9
|
+
<nav>
|
|
10
|
+
<a href="/about">About</a>
|
|
11
|
+
</nav>
|
|
12
|
+
</div>
|
|
13
|
+
`
|
|
14
|
+
},
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const metadata = {
|
|
18
|
+
title: "Home",
|
|
19
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SiteConfig } from "@inglorious/ssx"
|
|
2
|
+
|
|
3
|
+
const siteConfig: SiteConfig = {
|
|
4
|
+
title: "My SSX App",
|
|
5
|
+
meta: {
|
|
6
|
+
description: "Built with @inglorious/ssx",
|
|
7
|
+
},
|
|
8
|
+
// SSX includes image optimization by default
|
|
9
|
+
vite: {
|
|
10
|
+
server: {
|
|
11
|
+
port: 3000,
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default siteConfig
|
|
@@ -0,0 +1,23 @@
|
|
|
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"]
|
|
23
|
+
}
|
|
@@ -21,7 +21,10 @@
|
|
|
21
21
|
"eslint": "^9.39.1",
|
|
22
22
|
"prettier": "^3.6.2",
|
|
23
23
|
"rollup-plugin-minify-template-literals": "^1.1.7",
|
|
24
|
+
"sharp": "^0.34.5",
|
|
25
|
+
"svgo": "^4.0.0",
|
|
24
26
|
"typescript": "^5.9.2",
|
|
27
|
+
"vite-plugin-image-optimizer": "^2.0.3",
|
|
25
28
|
"vite": "^7.1.6"
|
|
26
29
|
},
|
|
27
30
|
"packageManager": "pnpm@10.15.0",
|
|
@@ -3,18 +3,21 @@
|
|
|
3
3
|
"target": "ESNext",
|
|
4
4
|
"useDefineForClassFields": true,
|
|
5
5
|
"module": "ESNext",
|
|
6
|
-
"lib": ["ESNext", "DOM"],
|
|
7
|
-
"
|
|
8
|
-
|
|
6
|
+
"lib": ["ESNext", "DOM", "DOM.Iterable"],
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
|
|
9
|
+
/* Bundler mode */
|
|
10
|
+
"moduleResolution": "bundler",
|
|
11
|
+
"allowImportingTsExtensions": true,
|
|
9
12
|
"resolveJsonModule": true,
|
|
10
13
|
"isolatedModules": true,
|
|
11
|
-
"esModuleInterop": true,
|
|
12
14
|
"noEmit": true,
|
|
15
|
+
|
|
16
|
+
/* Linting */
|
|
17
|
+
"strict": true,
|
|
13
18
|
"noUnusedLocals": true,
|
|
14
19
|
"noUnusedParameters": true,
|
|
15
|
-
"
|
|
16
|
-
"allowArbitraryExtensions": true,
|
|
17
|
-
"skipLibCheck": true
|
|
20
|
+
"noFallthroughCasesInSwitch": true
|
|
18
21
|
},
|
|
19
22
|
"include": ["src"]
|
|
20
23
|
}
|
|
@@ -3,6 +3,7 @@ import { fileURLToPath } from "node:url"
|
|
|
3
3
|
|
|
4
4
|
import { minifyTemplateLiterals } from "rollup-plugin-minify-template-literals"
|
|
5
5
|
import { defineConfig } from "vite"
|
|
6
|
+
import { ViteImageOptimizer } from "vite-plugin-image-optimizer"
|
|
6
7
|
|
|
7
8
|
const __filename = fileURLToPath(import.meta.url)
|
|
8
9
|
const __dirname = path.dirname(__filename)
|
|
@@ -12,7 +13,7 @@ export default defineConfig({
|
|
|
12
13
|
// @see https://github.com/vitejs/vite/issues/1973
|
|
13
14
|
define: { "process.env": {} },
|
|
14
15
|
|
|
15
|
-
plugins: [minifyTemplateLiterals()],
|
|
16
|
+
plugins: [minifyTemplateLiterals(), ViteImageOptimizer()],
|
|
16
17
|
|
|
17
18
|
resolve: {
|
|
18
19
|
alias: {
|