You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
838 B
34 lines
838 B
import riot from 'riot';
|
|
import { default as RiotControl } from 'riotcontrol';
|
|
import './post.tag';
|
|
import './posts.tag';
|
|
import './projects.tag';
|
|
import './app.tag';
|
|
import './grid.js';
|
|
import { default as promise } from 'es6-promise';
|
|
import { default as smooth } from 'smoothscroll-polyfill';
|
|
import 'element-closest';
|
|
import fetchCached from 'fetch-cached';
|
|
import 'whatwg-fetch';
|
|
|
|
window.cache = {};
|
|
window.riot = riot;
|
|
window.RiotControl = RiotControl;
|
|
|
|
window.cached = fetchCached({
|
|
fetch: fetch,
|
|
cache: {
|
|
get: ((k) => {
|
|
return new Promise((resolve, reject) => {
|
|
resolve(window.cache[k]);
|
|
});
|
|
}),
|
|
set: (k, v) => { window.cache[k] = v; }
|
|
}
|
|
});
|
|
|
|
window.addEventListener("load", () => {
|
|
promise.Promise.polyfill();
|
|
smooth.polyfill();
|
|
window.RiotControl.addStore(new riot.observable());
|
|
});
|
|
|