mirror of
https://github.com/amitwh/markdown-converter.git
synced 2026-08-02 18:10:18 +05:30
style: run prettier formatter over src and tests
This commit is contained in:
+13
-5
@@ -5,24 +5,32 @@ const GitOperations = require('../GitOperations');
|
||||
|
||||
function register(currentFileRef) {
|
||||
ipcMain.handle('git-status', async () => {
|
||||
const dir = currentFileRef.current ? require('path').dirname(currentFileRef.current) : process.cwd();
|
||||
const dir = currentFileRef.current
|
||||
? require('path').dirname(currentFileRef.current)
|
||||
: process.cwd();
|
||||
return GitOperations.getStatus(dir);
|
||||
});
|
||||
|
||||
ipcMain.handle('git-stage', async (_event, { files }) => {
|
||||
const dir = currentFileRef.current ? require('path').dirname(currentFileRef.current) : process.cwd();
|
||||
const dir = currentFileRef.current
|
||||
? require('path').dirname(currentFileRef.current)
|
||||
: process.cwd();
|
||||
return GitOperations.stage(dir, files);
|
||||
});
|
||||
|
||||
ipcMain.handle('git-commit', async (_event, { message }) => {
|
||||
const dir = currentFileRef.current ? require('path').dirname(currentFileRef.current) : process.cwd();
|
||||
const dir = currentFileRef.current
|
||||
? require('path').dirname(currentFileRef.current)
|
||||
: process.cwd();
|
||||
return GitOperations.commit(dir, message);
|
||||
});
|
||||
|
||||
ipcMain.handle('git-log', async () => {
|
||||
const dir = currentFileRef.current ? require('path').dirname(currentFileRef.current) : process.cwd();
|
||||
const dir = currentFileRef.current
|
||||
? require('path').dirname(currentFileRef.current)
|
||||
: process.cwd();
|
||||
return GitOperations.log(dir);
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = { register };
|
||||
module.exports = { register };
|
||||
|
||||
Reference in New Issue
Block a user