Skip to content

ArthurClemens/mithril-ts-vite-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mithril with TypeScript Vite Starter

Vite starter template to scaffold a new Mithril with TypeScript project.

This is an unopinionated template; aside from Mithril, TypeScript and Vite, the rest of your project's tools are entirely up to you.

Installation

Pull the template files with degit and install dependencies.

npx degit ArthurClemens/mithril-ts-vite-starter my-project
cd my-project
npm install

npm scripts

  • npm run dev - Starts the development server at port 3000
  • npm run build - Builds the application
  • npm run preview - Serves the build files locally at port 5000

Using JSX

Uncomment the esbuild configuration in vite.config.js.

Example App.tsx:

import m from "mithril";
import "./App.css";

export const App = () => {
  // Local state ...
  return {
    view: () => {
      return (
        <>
          <h1>My Mithril App</h1>
        </>
      );
    },
  };
};

See also

About

Mithril with TypeScript starter template for Vite

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published