2
0
mirror of https://github.com/frappe/books.git synced 2025-02-02 12:08:27 +00:00

Remove rootRequire

This commit is contained in:
Faris Ansari 2018-05-08 11:34:01 +05:30
parent 8e2a44bb89
commit 9799e75230
6 changed files with 4 additions and 12 deletions

View File

@ -1,5 +1 @@
global.rootRequire = function(name) {
return require(process.cwd() + '/' + name);
}
require('./client');

View File

@ -1,6 +1,6 @@
const frappe = require('frappejs');
const Bill = require('./BillDocument');
const LedgerPosting = rootRequire('accounting/ledgerPosting');
const LedgerPosting = require('../../../accounting/ledgerPosting');
module.exports = class BillServer extends Bill {
getPosting() {

View File

@ -1,6 +1,6 @@
const Invoice = require('./InvoiceDocument');
const frappe = require('frappejs');
const LedgerPosting = rootRequire('accounting/ledgerPosting');
const LedgerPosting = require('../../../accounting/ledgerPosting');
module.exports = class InvoiceServer extends Invoice {
getPosting() {

View File

@ -1,6 +1,6 @@
const frappe = require('frappejs');
const BaseDocument = require('frappejs/model/document');
const LedgerPosting = rootRequire('accounting/ledgerPosting');
const LedgerPosting = require('../../../accounting/ledgerPosting');
module.exports = class JournalEntryServer extends BaseDocument {
getPosting() {

View File

@ -1,6 +1,6 @@
const BaseDocument = require('frappejs/model/document');
const frappe = require('frappejs');
const LedgerPosting = rootRequire('accounting/ledgerPosting');
const LedgerPosting = require('../../../accounting/ledgerPosting');
module.exports = class PaymentServer extends BaseDocument {
getPosting() {

View File

@ -1,7 +1,3 @@
global.rootRequire = function(name) {
return require(process.cwd() + '/' + name);
}
const server = require('frappejs/server');
const frappe = require('frappejs');
const naming = require('frappejs/model/naming');