lib/inesita/cli/template/app/application.js.rb in inesita-0.0.4 vs lib/inesita/cli/template/app/application.js.rb in inesita-0.0.5

- old
+ new

@@ -1,10 +1,22 @@ require 'virtual-dom' require 'opal' require 'browser' require 'inesita' -require_tree './components' +require 'components/navbar' +require 'components/layout' +require 'components/home' +require 'components/welcome' +require 'components/goodbye' $document.ready do - WelcomeComponent.new.mount($document['app']) + Inesita::Application.new( + routes: { + '/' => Home, + '/welcome' => Welcome, + '/goodbye' => Goodbye + }, + mount: $document.body, + layout: Layout + ).run end