Skip to content

Instantly share code, notes, and snippets.

@porsager
Created September 26, 2017 10:35
Show Gist options
  • Select an option

  • Save porsager/db36f8780af81edda0525b9be08e3f7d to your computer and use it in GitHub Desktop.

Select an option

Save porsager/db36f8780af81edda0525b9be08e3f7d to your computer and use it in GitHub Desktop.
import m from 'mithril'
m.render(document.body, m('h1', 'hello world'))
{
"name": "mithriltypescript",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"build": "rollup -c"
},
"dependencies": {
"mithril": "1.1.3",
"rollup": "0.50.0",
"rollup-plugin-commonjs": "8.2.1",
"rollup-plugin-node-resolve": "3.0.0",
"rollup-plugin-typescript": "0.8.1",
"typescript": "2.5.2"
}
}
import typescript from 'rollup-plugin-typescript'
import resolve from 'rollup-plugin-node-resolve'
import commonjs from 'rollup-plugin-commonjs'
export default {
input: 'index.ts',
output: {
file: 'index.js',
format: 'iife'
},
plugins: [
resolve(),
commonjs(),
typescript()
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment