kiss-my-asset

0.1.2 • Public • Published

kiss-my-asset

Static site generator bild with KISS principle.

install

npm install kiss-my-asset

configure

Create kiss-my-asset.js in root of your project.

const renderPage = (path) => {
    return `Welcom on page ${path}`
}
 
const genPaths = () => ['/c.html', '/d.html']
 
exports.outputDir = '_site'
 
exports.routes = [
    { path: '/index.html', use: renderPage },
    { path: ['/a.html', '/b.html'], use: renderPage },
    { path: genPaths, use: renderPage }
]

generate

Run in root of your project

npx kiss-my-asset generate

dev web server

Run in root of your project

npx kiss-my-asset server

Web page is available under http://localhost:8080/

Package Sidebar

Install

npm i kiss-my-asset

Weekly Downloads

0

Version

0.1.2

License

MIT

Unpacked Size

5.13 kB

Total Files

6

Last publish

Collaborators

  • exys666