0.1.2 • Published 7 years ago

kiss-my-asset v0.1.2

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

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/