本文整理汇总了TypeScript中bobril.asset函数的典型用法代码示例。如果您正苦于以下问题:TypeScript asset函数的具体用法?TypeScript asset怎么用?TypeScript asset使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了asset函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
import * as b from 'bobril';
export const bobrilLogo = b.asset('./img/bobril.png');
export const bobrilLogoInverse = b.asset('./img/bobrilInverse.png');
示例2:
import * as b from 'bobril';
import * as f from './src/flux';
import * as mp from './src/mainPage';
import * as tdp from './src/todos/todosPage';
import * as s from './src/states';
import * as c from './src/states.cursors';
import * as wnp from './src/whatNext/page';
b.asset('css/bootstrap.css');
f.bootstrap(s.createDefaultApplicationState(), (message, params) => { });
b.routes(
b.route(
{
url: '/',
handler: mp.create
},
[
b.route({
url: '/todos',
name: 'todos',
handler: tdp.create(c.todosCursor)
}),
b.route({
url: '/whatNext',
name: 'whatNext',
handler: wnp.create(c.whatNextCursor)
}),
b.routeDefault({
name: 'default',
示例3:
import * as b from "bobril";
b.asset("global.js");
declare var GL: number;
b.init(()=>{
return "Number from global js is "+GL;
});
示例4: initRobotoFonts
import * as b from "bobril";
b.asset("node_modules/webfontloader/webfontloader.js");
declare var WebFont: any;
export function initRobotoFonts(subsets = 'latin') {
WebFont.load({ google: { families: ['Roboto:400,500:' + subsets] },
active() { b.invalidate(); },
inactive() { b.invalidate(); },
classes: false
});
}
示例5:
import * as b from "bobril";
b.asset("./css/flexboxgrid.min.css");
export const columnsCount = 12;
export * from "./src/grid";
export * from "./src/row";
export * from "./src/col";