A simple livereload for TVML-based JavaScript-Apps on tvOS
Feel free to donate
Or donate Bitcoins:
Also via greenaddress
npm install tvml-kit-livereload --save-dev
Or if you want to use the development version (nightly build), which maybe not stable!:
npm install tvml-kit-livereload@next --save-dev
Mainly used for integration in other Tools, like Grunt or WebPack
var port = 9000;
var livereload = require('tvml-kit-livereload');
// start server
livereload.start(9000, function(io){
// add reload function in app
var updateAppJS = livereload.prepareApplicationJS(__dirname + '/application.js');
write updated application.js back
// bind reload, e.g. in WebPack or watch
livereload.reload();
});
Thanks to joshhunt. His project was base for this.
MIT, Copyright 2016 Martin Reinhardt