mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 20:30:33 +00:00
fix: change root directory.
This commit is contained in:
@@ -2,7 +2,7 @@ import path from 'path';
|
||||
import moment from 'moment';
|
||||
|
||||
global.__root_dir = path.join(__dirname, '..');
|
||||
global.__resources_dir = path.join(global.__root, 'resources');
|
||||
global.__resources_dir = path.join(global.__root_dir, 'resources');
|
||||
global.__locales_dir = path.join(global.__resources_dir, 'locales');
|
||||
|
||||
moment.prototype.toMySqlDateTime = function () {
|
||||
|
||||
@@ -109,7 +109,7 @@ export default class Mail {
|
||||
* Retrieve view content from the view directory.
|
||||
*/
|
||||
private getViewContent(): string {
|
||||
const filePath = path.join(global.__root, `../views/${this.view}`);
|
||||
const filePath = path.join(global.__root_dir, `../views/${this.view}`);
|
||||
return fs.readFileSync(filePath, 'utf8');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user