Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

hono-mvc

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

hono-mvc

Toolkit for the lean web

unpublished
latest
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

Lean Web Kit

Toolkit for the lean web

Ruby on rails for the modern web for JavaScript/Typescript developers

🚧 This project is still in the experimental stage. Do not use in production

Features

  • Hot Module Reload
  • Use Svelte for templating with familiar express like router
  • Scoped css, build your apps with reusable components
  • Markdown support, MDX but for svelte (link)
  • Deploy anywhere, with adapters for different platforms. Currently supported Vercel and Node
  • Build websites/apps with modern DX (bundling, minifying etc) without sacrificing the user experience
  • Use only what you need, no unnecessary JavaScript sent to the client
  • Modern SPA features by using Turbolinks, HTMX etc

Examples

Project structure

. └── app/ ├── src/ │ ├── views - your view templates/ │ │ ├── home.html │ │ └── about.html │ └── entry.ts - entry point for your application routes ├── hono-mvc.d.ts ├── vite.config.js ├── package.json └── tsconfig.json

Routing

link

import {render} from 'core/runtime'

const app = new Router()

app.get('/', () => render('home', {/* your template data (props) */}))

// ...

Gotchas

  • Templating is done using svelte, but template files must use the .html file extension instead of .svelte

  • Markdown files must include .md in the filename e.g about.md.html

  • Svelte client side reactivity is not supported, we only send plain-old-html to the client

  • Imports in templates must always include the file extension. Writing

<script>
  import Component from "./component"
  import Enum from './types/enum'
</script>

will not work, it has to be

<script>
  import Component from "./component.html"
  import Enum from './types/enum.ts'
</script>

FAQs

Package last updated on 20 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts