spacejack / mithril-ts-example

Mithril 2.0 with Typescript example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mithril / Typescript Example Project

This is a very barebones example project using Mithril 2.0 and TypeScript.

This project uses browserify and tsify to compile the app source files and 3rd party npm modules into a single app bundle. It uses budo to serve and live-reload the public directory on a local server.

Installation:

npm install

Recommended VSCode Extensions

  • tslint

Serve this project locally and recompile .ts sources on save:

npm start

Then go to http://localhost:3000 in your browser. This will serve the files in the public directory, defaulting to the index.html file.

The file public/js/app.js is rebuilt and auto-reloaded whenever the ts sources are edited.

Build a minified bundle

npm run build

Will output a minified app.js file in public/js


For a more complete project setup with PostCSS compilation and hot reloading, take a look at this repo.

About

Mithril 2.0 with Typescript example


Languages

Language:TypeScript 66.8%Language:HTML 26.9%Language:CSS 6.3%