minimaz-cli 0.1.0 → 0.1.1
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 +6 -6
- package/README.md +106 -106
- package/{dist/bin → bin}/cli.js +1 -1
- package/package.json +41 -57
- package/bin/cli.ts +0 -80
- package/dist/LICENSE +0 -7
- package/dist/README.md +0 -103
- package/dist/package.json +0 -42
- package/src/commands/build.ts +0 -176
- package/src/commands/help.ts +0 -33
- package/src/commands/init.ts +0 -56
- package/src/commands/template.ts +0 -146
- package/src/templates/default/minimaz.config.json +0 -26
- package/src/templates/default/public/assets/.gitkeep +0 -0
- package/src/templates/default/public/favicon.ico +0 -0
- package/src/templates/default/src/index.html +0 -80
- package/src/templates/default/src/pages/about.html +0 -46
- package/src/templates/default/src/script.js +0 -1
- package/src/templates/default/src/style.css +0 -99
- package/src/templates/gitignore +0 -2
- package/src/templates/simple/minimaz.config.json +0 -26
- package/src/templates/simple/public/assets/.gitkeep +0 -0
- package/src/templates/simple/public/favicon.ico +0 -0
- package/src/templates/simple/src/index.html +0 -15
- package/src/templates/simple/src/pages/page.html +0 -11
- package/src/templates/simple/src/script.js +0 -1
- package/src/templates/simple/src/style.css +0 -0
- package/src/utils/functions.ts +0 -161
- package/src/utils/loadConfig.ts +0 -61
- package/src/utils/logService.ts +0 -19
- package/src/utils/postInstall.ts +0 -16
package/LICENSE
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
Copyright (c) 2025 Hans Zeller (info@zellerindustries.com)
|
|
2
|
-
|
|
3
|
-
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:
|
|
4
|
-
|
|
5
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
-
|
|
1
|
+
Copyright (c) 2025 Hans Zeller (info@zellerindustries.com)
|
|
2
|
+
|
|
3
|
+
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:
|
|
4
|
+
|
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
+
|
|
7
7
|
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.
|
package/README.md
CHANGED
|
@@ -1,107 +1,107 @@
|
|
|
1
|
-
# Minimaz ⚡
|
|
2
|
-
|
|
3
|
-
**Minimaz** is a minimal, zero-dependency static site builder and project initializer focused on speed, simplicity, and clean output.
|
|
4
|
-
|
|
5
|
-
## 🚀 Features
|
|
6
|
-
|
|
7
|
-
* 📁 Initialize projects from global templates
|
|
8
|
-
* 🧩 Save, list, and delete custom templates
|
|
9
|
-
* 📝 Supports HTML, CSS, JS, and TypeScript (.ts → .js)
|
|
10
|
-
* 🧹 Minifies HTML, CSS, JS, and TS (compiled & minified)
|
|
11
|
-
* ⚙️ Configurable with a `minimaz.config.json` file
|
|
12
|
-
* ➕ Supports concatenation of additional scripts and styles
|
|
13
|
-
* 🪄 Optional path replacements for asset links
|
|
14
|
-
* 🪶 Lightweight and fast — ideal for small static or utility projects
|
|
15
|
-
* 🔥 Usable with `minimaz` or alias `mz`
|
|
16
|
-
* 🆕 Display version with `minimaz version`
|
|
17
|
-
|
|
18
|
-
## 📦 Installation
|
|
19
|
-
|
|
20
|
-
Run directly with `npx` without global install:
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
npx minimaz init my-site
|
|
24
|
-
cd my-site
|
|
25
|
-
npx minimaz build
|
|
26
|
-
npx minimaz version
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
Or using the alias:
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
npx mz init my-site
|
|
33
|
-
npx mz build
|
|
34
|
-
npx mz version
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
## 📁 Project Structure
|
|
38
|
-
|
|
39
|
-
```txt
|
|
40
|
-
my-site/
|
|
41
|
-
├── src/ # HTML, CSS, JS, TS files
|
|
42
|
-
├── public/ # Static assets (images, fonts, etc.)
|
|
43
|
-
├── dist/ # Output folder (generated)
|
|
44
|
-
├── minimaz.config.json
|
|
45
|
-
└── ...
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
## ⚙️ Configuration
|
|
49
|
-
|
|
50
|
-
Customize your build using a `minimaz.config.json` file:
|
|
51
|
-
|
|
52
|
-
```json
|
|
53
|
-
{
|
|
54
|
-
"src": "src",
|
|
55
|
-
"dist": "dist",
|
|
56
|
-
"public": "public",
|
|
57
|
-
"minify": {
|
|
58
|
-
"html": true,
|
|
59
|
-
"css": true,
|
|
60
|
-
"js": true,
|
|
61
|
-
"ts": true
|
|
62
|
-
},
|
|
63
|
-
"replace": {
|
|
64
|
-
"../public/": "public/"
|
|
65
|
-
},
|
|
66
|
-
"styles": [
|
|
67
|
-
"style.css",
|
|
68
|
-
"theme.css"
|
|
69
|
-
],
|
|
70
|
-
"scripts": [
|
|
71
|
-
"lib.js",
|
|
72
|
-
"script.js"
|
|
73
|
-
]
|
|
74
|
-
}
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
* `styles` (optional): array of `.css` files to concatenate and minify into a single `style.css`
|
|
78
|
-
* `scripts` (optional): array of `.js` files to concatenate and minify into a single `script.js`
|
|
79
|
-
* If omitted, fallback defaults are `style.css` and `script.js`
|
|
80
|
-
|
|
81
|
-
## 🛠 Commands
|
|
82
|
-
|
|
83
|
-
```bash
|
|
84
|
-
minimaz init <project-name> # Create a new project using global templates
|
|
85
|
-
minimaz build # Build and minify the site (uses config or defaults)
|
|
86
|
-
minimaz template <path> # Save a new template from specified path (or current dir)
|
|
87
|
-
minimaz template -l # List available templates
|
|
88
|
-
minimaz template -d <name> # Delete a saved template
|
|
89
|
-
minimaz help # Show help message
|
|
90
|
-
minimaz version # Display Minimaz version
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
*All commands also work with the alias `mz`.*
|
|
94
|
-
|
|
95
|
-
## 📂 Templates
|
|
96
|
-
|
|
97
|
-
Minimaz supports global templates stored in:
|
|
98
|
-
|
|
99
|
-
```bash
|
|
100
|
-
~/.minimaz/templates
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
Use them to quickly initialize consistent projects across environments.
|
|
104
|
-
|
|
105
|
-
## 📄 License
|
|
106
|
-
|
|
1
|
+
# Minimaz ⚡
|
|
2
|
+
|
|
3
|
+
**Minimaz** is a minimal, zero-dependency static site builder and project initializer focused on speed, simplicity, and clean output.
|
|
4
|
+
|
|
5
|
+
## 🚀 Features
|
|
6
|
+
|
|
7
|
+
* 📁 Initialize projects from global templates
|
|
8
|
+
* 🧩 Save, list, and delete custom templates
|
|
9
|
+
* 📝 Supports HTML, CSS, JS, and TypeScript (.ts → .js)
|
|
10
|
+
* 🧹 Minifies HTML, CSS, JS, and TS (compiled & minified)
|
|
11
|
+
* ⚙️ Configurable with a `minimaz.config.json` file
|
|
12
|
+
* ➕ Supports concatenation of additional scripts and styles
|
|
13
|
+
* 🪄 Optional path replacements for asset links
|
|
14
|
+
* 🪶 Lightweight and fast — ideal for small static or utility projects
|
|
15
|
+
* 🔥 Usable with `minimaz` or alias `mz`
|
|
16
|
+
* 🆕 Display version with `minimaz version`
|
|
17
|
+
|
|
18
|
+
## 📦 Installation
|
|
19
|
+
|
|
20
|
+
Run directly with `npx` without global install:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npx minimaz init my-site
|
|
24
|
+
cd my-site
|
|
25
|
+
npx minimaz build
|
|
26
|
+
npx minimaz version
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Or using the alias:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npx mz init my-site
|
|
33
|
+
npx mz build
|
|
34
|
+
npx mz version
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## 📁 Project Structure
|
|
38
|
+
|
|
39
|
+
```txt
|
|
40
|
+
my-site/
|
|
41
|
+
├── src/ # HTML, CSS, JS, TS files
|
|
42
|
+
├── public/ # Static assets (images, fonts, etc.)
|
|
43
|
+
├── dist/ # Output folder (generated)
|
|
44
|
+
├── minimaz.config.json
|
|
45
|
+
└── ...
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## ⚙️ Configuration
|
|
49
|
+
|
|
50
|
+
Customize your build using a `minimaz.config.json` file:
|
|
51
|
+
|
|
52
|
+
```json
|
|
53
|
+
{
|
|
54
|
+
"src": "src",
|
|
55
|
+
"dist": "dist",
|
|
56
|
+
"public": "public",
|
|
57
|
+
"minify": {
|
|
58
|
+
"html": true,
|
|
59
|
+
"css": true,
|
|
60
|
+
"js": true,
|
|
61
|
+
"ts": true
|
|
62
|
+
},
|
|
63
|
+
"replace": {
|
|
64
|
+
"../public/": "public/"
|
|
65
|
+
},
|
|
66
|
+
"styles": [
|
|
67
|
+
"style.css",
|
|
68
|
+
"theme.css"
|
|
69
|
+
],
|
|
70
|
+
"scripts": [
|
|
71
|
+
"lib.js",
|
|
72
|
+
"script.js"
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
* `styles` (optional): array of `.css` files to concatenate and minify into a single `style.css`
|
|
78
|
+
* `scripts` (optional): array of `.js` files to concatenate and minify into a single `script.js`
|
|
79
|
+
* If omitted, fallback defaults are `style.css` and `script.js`
|
|
80
|
+
|
|
81
|
+
## 🛠 Commands
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
minimaz init <project-name> # Create a new project using global templates
|
|
85
|
+
minimaz build # Build and minify the site (uses config or defaults)
|
|
86
|
+
minimaz template <path> # Save a new template from specified path (or current dir)
|
|
87
|
+
minimaz template -l # List available templates
|
|
88
|
+
minimaz template -d <name> # Delete a saved template
|
|
89
|
+
minimaz help # Show help message
|
|
90
|
+
minimaz version # Display Minimaz version
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
*All commands also work with the alias `mz`.*
|
|
94
|
+
|
|
95
|
+
## 📂 Templates
|
|
96
|
+
|
|
97
|
+
Minimaz supports global templates stored in:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
~/.minimaz/templates
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Use them to quickly initialize consistent projects across environments.
|
|
104
|
+
|
|
105
|
+
## 📄 License
|
|
106
|
+
|
|
107
107
|
MIT
|
package/{dist/bin → bin}/cli.js
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{fileURLToPath as n}from"url";import{dirname as r,join as s}from"path";import m from"fs-extra";import{build as p}from"../src/commands/build.js";import{init as c}from"../src/commands/init.js";import{help as l}from"../src/commands/help.js";import{template as d}from"../src/commands/template.js";import{log as a}from"../src/utils/logService.js";import{parseArgs as f}from"../src/utils/functions.js";const g=n(import.meta.url),
|
|
2
|
+
import{fileURLToPath as n}from"url";import{dirname as r,join as s}from"path";import m from"fs-extra";import{build as p}from"../src/commands/build.js";import{init as c}from"../src/commands/init.js";import{help as l}from"../src/commands/help.js";import{template as d}from"../src/commands/template.js";import{log as a}from"../src/utils/logService.js";import{parseArgs as f}from"../src/utils/functions.js";const g=n(import.meta.url),v=r(g),u=s(v,"../package.json"),h=await m.readJson(u),y=h.version;async function _(){const e=f(process.argv.slice(2)),i=(e._[0]||"").toLowerCase(),o={init:async()=>{await c(e._[1]||"minimaz-project",{template:e.template||e.t||"default"})},build:async()=>p(),help:()=>l(),template:async()=>{await d(e._[1],{list:e.l||e.list,delete:e.d||e.delete,update:e.u||e.update})},version:()=>console.log(y),i:()=>o.init(),b:()=>o.build(),h:()=>o.help(),t:()=>o.template(),v:()=>o.version()};try{o[i]?await o[i]():(a("error",`Unknown command '${i}'. Use 'minimaz help' to see available commands.`),o.help())}catch(t){a("error",t instanceof Error?process.env.DEBUG?t.stack??t.message:t.message:String(t)),process.exit(1)}}_();
|
package/package.json
CHANGED
|
@@ -1,57 +1,41 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "minimaz-cli",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Minimal project initializer and builder CLI",
|
|
5
|
-
"author": "MrZeller",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"type": "module",
|
|
8
|
-
"files": [
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
"clean-css": "^5.3.3",
|
|
43
|
-
"fs-extra": "^11.3.0",
|
|
44
|
-
"html-minifier-terser": "^7.2.0",
|
|
45
|
-
"terser": "^5.44.0"
|
|
46
|
-
},
|
|
47
|
-
"devDependencies": {
|
|
48
|
-
"@types/clean-css": "^4.2.11",
|
|
49
|
-
"@types/fs-extra": "^11.0.4",
|
|
50
|
-
"@types/html-minifier-terser": "^7.0.2",
|
|
51
|
-
"@types/node": "^24.7.2",
|
|
52
|
-
"esbuild": "^0.25.10",
|
|
53
|
-
"ts-node": "^10.9.2",
|
|
54
|
-
"typescript": "^5.9.3"
|
|
55
|
-
},
|
|
56
|
-
"postinstall": "node ./dist/src/utils/postInstall.js"
|
|
57
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "minimaz-cli",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Minimal project initializer and builder CLI",
|
|
5
|
+
"author": "MrZeller",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist/",
|
|
10
|
+
"LICENSE",
|
|
11
|
+
"README.md",
|
|
12
|
+
"package.json"
|
|
13
|
+
],
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "https://github.com/zeller-dev/minimaz-cli.git"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [
|
|
19
|
+
"cli",
|
|
20
|
+
"minimal",
|
|
21
|
+
"build",
|
|
22
|
+
"init",
|
|
23
|
+
"project",
|
|
24
|
+
"starter"
|
|
25
|
+
],
|
|
26
|
+
"homepage": "https://github.com/zeller-dev/minimaz-cli#readme",
|
|
27
|
+
"bugs": {
|
|
28
|
+
"url": "https://github.com/zeller-dev/minimaz-cli/issues"
|
|
29
|
+
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"clean-css": "^5.3.3",
|
|
32
|
+
"fs-extra": "^11.3.0",
|
|
33
|
+
"html-minifier-terser": "^7.2.0",
|
|
34
|
+
"terser": "^5.44.0"
|
|
35
|
+
},
|
|
36
|
+
"postinstall": "node ./dist/src/utils/postInstall.js",
|
|
37
|
+
"bin": {
|
|
38
|
+
"minimaz": "./bin/cli.js",
|
|
39
|
+
"mz": "./bin/cli.js"
|
|
40
|
+
}
|
|
41
|
+
}
|
package/bin/cli.ts
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { fileURLToPath } from 'url'
|
|
3
|
-
import { dirname, join } from 'path'
|
|
4
|
-
import fs from 'fs-extra'
|
|
5
|
-
|
|
6
|
-
import { build } from '../src/commands/build.js'
|
|
7
|
-
import { init } from '../src/commands/init.js'
|
|
8
|
-
import { help } from '../src/commands/help.js'
|
|
9
|
-
import { template } from '../src/commands/template.js'
|
|
10
|
-
|
|
11
|
-
import { log } from '../src/utils/logService.js'
|
|
12
|
-
import { parseArgs } from '../src/utils/functions.js'
|
|
13
|
-
|
|
14
|
-
const __filename = fileURLToPath(import.meta.url)
|
|
15
|
-
const __dirname = dirname(__filename)
|
|
16
|
-
|
|
17
|
-
// Read version from package.json dynamically
|
|
18
|
-
const pkgPath = join(__dirname, '../package.json')
|
|
19
|
-
const pkgJson = await fs.readJson(pkgPath)
|
|
20
|
-
const version = pkgJson.version as string
|
|
21
|
-
|
|
22
|
-
async function main(): Promise<void> {
|
|
23
|
-
const args = parseArgs(process.argv.slice(2))
|
|
24
|
-
const cmd = (args._[0] || '').toLowerCase()
|
|
25
|
-
|
|
26
|
-
type CommandFn = () => Promise<void> | void
|
|
27
|
-
|
|
28
|
-
const commands: Record<string, CommandFn> = {
|
|
29
|
-
// Init Command
|
|
30
|
-
init: async () => {
|
|
31
|
-
await init(args._[1] || 'minimaz-project', {
|
|
32
|
-
template: args.template || args.t || 'default'
|
|
33
|
-
})
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
-
// Build Command
|
|
37
|
-
build: async () => build(),
|
|
38
|
-
|
|
39
|
-
// Help Command
|
|
40
|
-
help: () => help(),
|
|
41
|
-
|
|
42
|
-
// Template Command
|
|
43
|
-
template: async () => {
|
|
44
|
-
await template(args._[1], {
|
|
45
|
-
list: args.l || args.list,
|
|
46
|
-
delete: args.d || args.delete,
|
|
47
|
-
update: args.u || args.update
|
|
48
|
-
} as any)
|
|
49
|
-
},
|
|
50
|
-
|
|
51
|
-
// Version
|
|
52
|
-
version: () => console.log(version),
|
|
53
|
-
|
|
54
|
-
// Aliases
|
|
55
|
-
i: () => commands.init(),
|
|
56
|
-
b: () => commands.build(),
|
|
57
|
-
h: () => commands.help(),
|
|
58
|
-
t: () => commands.template(),
|
|
59
|
-
v: () => commands.version()
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
try {
|
|
63
|
-
if (commands[cmd]) {
|
|
64
|
-
await commands[cmd]()
|
|
65
|
-
} else {
|
|
66
|
-
log('error', `Unknown command '${cmd}'. Use 'minimaz help' to see available commands.`)
|
|
67
|
-
commands.help()
|
|
68
|
-
}
|
|
69
|
-
} catch (e: any) {
|
|
70
|
-
log(
|
|
71
|
-
'error',
|
|
72
|
-
e instanceof Error
|
|
73
|
-
? process.env.DEBUG ? e.stack ?? e.message : e.message
|
|
74
|
-
: String(e)
|
|
75
|
-
)
|
|
76
|
-
process.exit(1)
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
main()
|
package/dist/LICENSE
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
Copyright (c) 2025 Hans Zeller (info@zellerindustries.com)
|
|
2
|
-
|
|
3
|
-
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:
|
|
4
|
-
|
|
5
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
-
|
|
7
|
-
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.
|
package/dist/README.md
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
# Minimaz ⚡
|
|
2
|
-
|
|
3
|
-
**Minimaz** is a minimal, zero-dependency static site builder and project initializer focused on speed, simplicity, and clean output.
|
|
4
|
-
|
|
5
|
-
## 🚀 Features
|
|
6
|
-
|
|
7
|
-
- 📁 Initialize projects from global templates
|
|
8
|
-
- 🧩 Save, list, and delete custom templates
|
|
9
|
-
- 📝 Supports HTML, CSS, JS, and TypeScript (.ts → .js)
|
|
10
|
-
- 🧹 Minifies HTML, CSS, JS, and TS (compiled & minified)
|
|
11
|
-
- ⚙️ Configurable with a `minimaz.config.json` file
|
|
12
|
-
- ➕ Supports concatenation of additional scripts and styles
|
|
13
|
-
- 🪄 Optional path replacements for asset links
|
|
14
|
-
- 🪶 Lightweight and fast — ideal for small static or utility projects
|
|
15
|
-
- 🔥 Usable with `minimaz` or alias `mz`
|
|
16
|
-
|
|
17
|
-
## 📦 Installation
|
|
18
|
-
|
|
19
|
-
Run directly with `npx` without global install:
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
npx minimaz init my-site
|
|
23
|
-
cd my-site
|
|
24
|
-
npx minimaz build
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
Or using the alias:
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
npx mz init my-site
|
|
31
|
-
npx mz build
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## 📁 Project Structure
|
|
35
|
-
|
|
36
|
-
```txt
|
|
37
|
-
my-site/
|
|
38
|
-
├── src/ # HTML, CSS, JS, TS files
|
|
39
|
-
├── public/ # Static assets (images, fonts, etc.)
|
|
40
|
-
├── dist/ # Output folder (generated)
|
|
41
|
-
├── minimaz.config.json
|
|
42
|
-
└── ...
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
## ⚙️ Configuration
|
|
46
|
-
|
|
47
|
-
Customize your build using a `minimaz.config.json` file:
|
|
48
|
-
|
|
49
|
-
```json
|
|
50
|
-
{
|
|
51
|
-
"src": "src",
|
|
52
|
-
"dist": "dist",
|
|
53
|
-
"public": "public",
|
|
54
|
-
"minify": {
|
|
55
|
-
"html": true,
|
|
56
|
-
"css": true,
|
|
57
|
-
"js": true,
|
|
58
|
-
"ts": true
|
|
59
|
-
},
|
|
60
|
-
"replace": {
|
|
61
|
-
"../public/": "public/"
|
|
62
|
-
},
|
|
63
|
-
"styles": [
|
|
64
|
-
"style.css",
|
|
65
|
-
"theme.css"
|
|
66
|
-
],
|
|
67
|
-
"scripts": [
|
|
68
|
-
"lib.js",
|
|
69
|
-
"script.js"
|
|
70
|
-
]
|
|
71
|
-
}
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
- `styles` (optional): array of `.css` files to concatenate and minify into a single `style.css`
|
|
75
|
-
- `scripts` (optional): array of `.js` files to concatenate and minify into a single `script.js`
|
|
76
|
-
- If omitted, fallback defaults are `style.css` and `script.js`
|
|
77
|
-
|
|
78
|
-
## 🛠 Commands
|
|
79
|
-
|
|
80
|
-
```bash
|
|
81
|
-
minimaz init <project-name> # Create a new project using global templates
|
|
82
|
-
minimaz build # Build and minify the site (uses config or defaults)
|
|
83
|
-
minimaz template <path> # Save a new template from specified path (or current dir)
|
|
84
|
-
minimaz template -l # List available templates
|
|
85
|
-
minimaz template -d <name> # Delete a saved template
|
|
86
|
-
minimaz help # Show help message
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
_All commands also work with the alias `mz`._
|
|
90
|
-
|
|
91
|
-
## 📂 Templates
|
|
92
|
-
|
|
93
|
-
Minimaz supports global templates stored in:
|
|
94
|
-
|
|
95
|
-
```bash
|
|
96
|
-
~/.minimaz/templates
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
Use them to quickly initialize consistent projects across environments.
|
|
100
|
-
|
|
101
|
-
## 📄 License
|
|
102
|
-
|
|
103
|
-
MIT
|
package/dist/package.json
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "minimaz-cli",
|
|
3
|
-
"version": "0.1.0",
|
|
4
|
-
"description": "Minimal project initializer and builder CLI",
|
|
5
|
-
"author": "MrZeller",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"type": "module",
|
|
8
|
-
"files": [
|
|
9
|
-
"bin/",
|
|
10
|
-
"src/",
|
|
11
|
-
"LICENSE",
|
|
12
|
-
"README.md",
|
|
13
|
-
"package.json"
|
|
14
|
-
],
|
|
15
|
-
"repository": {
|
|
16
|
-
"type": "git",
|
|
17
|
-
"url": "https://github.com/zeller-dev/minimaz-cli.git"
|
|
18
|
-
},
|
|
19
|
-
"keywords": [
|
|
20
|
-
"cli",
|
|
21
|
-
"minimal",
|
|
22
|
-
"build",
|
|
23
|
-
"init",
|
|
24
|
-
"project",
|
|
25
|
-
"starter"
|
|
26
|
-
],
|
|
27
|
-
"homepage": "https://github.com/zeller-dev/minimaz-cli#readme",
|
|
28
|
-
"bugs": {
|
|
29
|
-
"url": "https://github.com/zeller-dev/minimaz-cli/issues"
|
|
30
|
-
},
|
|
31
|
-
"dependencies": {
|
|
32
|
-
"clean-css": "^5.3.3",
|
|
33
|
-
"fs-extra": "^11.3.0",
|
|
34
|
-
"html-minifier-terser": "^7.2.0",
|
|
35
|
-
"terser": "^5.44.0"
|
|
36
|
-
},
|
|
37
|
-
"postinstall": "node ./dist/src/utils/postInstall.js",
|
|
38
|
-
"bin": {
|
|
39
|
-
"minimaz": "./bin/cli.js",
|
|
40
|
-
"mz": "./bin/cli.js"
|
|
41
|
-
}
|
|
42
|
-
}
|