mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 06:10:31 +00:00
fix: change root directory.
This commit is contained in:
@@ -2,7 +2,7 @@ import path from 'path';
|
|||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
|
|
||||||
global.__root_dir = path.join(__dirname, '..');
|
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');
|
global.__locales_dir = path.join(global.__resources_dir, 'locales');
|
||||||
|
|
||||||
moment.prototype.toMySqlDateTime = function () {
|
moment.prototype.toMySqlDateTime = function () {
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ export default class Mail {
|
|||||||
* Retrieve view content from the view directory.
|
* Retrieve view content from the view directory.
|
||||||
*/
|
*/
|
||||||
private getViewContent(): string {
|
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');
|
return fs.readFileSync(filePath, 'utf8');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user