2
0
mirror of https://github.com/frappe/books.git synced 2024-11-13 00:46:28 +00:00
books/client/index.js
2018-02-14 22:14:50 +05:30

23 lines
579 B
JavaScript

const common = require('frappejs/common');
const RESTClient = require('frappejs/backends/rest_client');
const frappe = require('frappejs');
frappe.ui = require('./ui');
const Desk = require('./desk');
module.exports = {
async start({server, columns = 2}) {
window.frappe = frappe;
frappe.init();
common.init_libs(frappe);
frappe.fetch = window.fetch.bind();
frappe.db = await new RESTClient({server: server});
frappe.flags.cache_docs = true;
frappe.desk = new Desk(columns);
await frappe.login();
}
};