Package Exports
- minista
- minista/dist/main.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (minista) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
minista
About
Next.js Like Development with 100% Static Generate.
How To Use
Automatic Setup
$ npm init minista@next
Manual Setup
$ npm install --save-dev minista@next react react-dom
public # Copy dist
src
└── pages # Required!
├── about
│ └── index.tsx
└── index.tsx
const PageHome = () => {
return (
<h1>Home</h1>
)
}
export default PageHome
Open package.json
and add the following scripts:
"scripts": {
"dev": "minista",
"build": "minista build",
"preview": "minista preview",
}
Commands
command | detail |
---|---|
minista |
Development mode, Press Ctrl+C to stop |
minista build |
Static site generate |
minista preview |
Static data preview |
Customize
// minista.config.ts
import { defineConfig } from "minista"
export default defineConfig({
entry: "", // string | string[] | { [key: string]: string }
outDir: "dist", // string
publicDir: "public", // string
assetsDir: "assets", // string
bundleName: "bundle", // string
vite: {}, // https://vitejs.dev/config/
markdown: {
syntaxHighlighter: "shiki", // "shiki" | "prism" | "highlight"
shikiOptions: {
theme: "nord", // https://github.com/shikijs/shiki/blob/main/docs/themes.md#loading-theme
},
mdxOptions: {
remarkPlugins: [], // https://mdxjs.com/packages/mdx/#optionsremarkplugins
rehypePlugins: [], // https://mdxjs.com/packages/mdx/#optionsrehypeplugins
},
},
beautify: {
useHtml: true, // boolean
useCss: false, // boolean
useJs: false, // boolean
htmlOptions: {
indent_size: 2,
max_preserve_newlines: 0,
indent_inner_html: true,
extra_liners: [],
}, // https://github.com/beautify-web/js-beautify#css--html
cssOptions: {}, // https://github.com/beautify-web/js-beautify#css--html
jsOptions: {}, // https://github.com/beautify-web/js-beautify#options
},
})
License
- MIT