Boilerplate to kickstart creating an app with Electron and Polymer Starter Kit
In your directory, run:
$ curl -fsSL https://github.com/ragingwind/electron-psk-boilerplate/archive/master.tar.gz | tar -xz --strip-components 2
You can also git clone
or download this repo and get contents of the boilerplate
folder.
Yet There's also a Yeoman generator.
You should add the following code to src/app/elements/routing.html
. See the doc for further information.
page('*', function() {
page.redirect('/');
});
You probably see the notification about route failed that could be annoyed but you could ignore it as update by code below in commenting toast code.
// 404
page('*', function() {
// app.$.toast.text = 'Can\'t find: ' + window.location.href + '. Redirected you to Home Page';
// app.$.toast.show();
page.redirect(app.baseUrl);
});
MIT © ragingwind