Skip to content

Commit 8bba06c

Browse files
committed
update fs
1 parent 32982ed commit 8bba06c

File tree

15 files changed

+57
-60
lines changed

15 files changed

+57
-60
lines changed

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"dependencies": {
5959
"@skpm/child_process": "^0.4.2",
6060
"@skpm/dialog": "^0.4.0",
61-
"@skpm/fs": "^0.2.5",
61+
"@skpm/fs": "^0.2.6",
6262
"linkstate": "^1.1.1",
6363
"preact": "^10.3.4",
6464
"sketch-module-user-preferences": "^1.0.1",

src/commands/Add.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ import {
33
getCurrentFileName,
44
checkForFile,
55
executeSafely,
6-
exec
6+
exec,
77
} from "../common";
88
import { UI } from "sketch";
99

10-
export default function() {
10+
export default function () {
1111
if (!checkForFile()) {
1212
return;
1313
}
14-
executeSafely(function() {
14+
executeSafely(function () {
1515
const currentFileName = getCurrentFileName();
1616
if (currentFileName) {
1717
exec(`git add "${currentFileName}"`);

src/commands/Branches.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { UI } from "sketch";
33
import { getCurrentBranch, checkForFile, exec, executeSafely } from "../common";
44
import WebUI from "sketch-module-web-view";
55

6-
export default function() {
6+
export default function () {
77
if (!checkForFile()) {
88
return;
99
}
@@ -26,7 +26,7 @@ export default function() {
2626
minimizable: false,
2727
maximizable: false,
2828
titleBarStyle: "hidden",
29-
show: false
29+
show: false,
3030
});
3131

3232
webUI.loadURL(require("../../Resources/branches.html"));
@@ -42,23 +42,23 @@ export default function() {
4242
webUI.webContents.executeJavaScript("window.ready=true");
4343
});
4444

45-
webUI.webContents.on("checkoutBranch", name => {
46-
executeSafely(function() {
45+
webUI.webContents.on("checkoutBranch", (name) => {
46+
executeSafely(function () {
4747
exec(`git checkout -q ${name}`);
4848
const app = NSApp.delegate();
4949
app.refreshCurrentDocument();
5050
webUI.close();
5151
UI.message(`Switched to branch '${name}'`);
5252
});
5353
});
54-
webUI.webContents.on("deleteBranch", name => {
55-
executeSafely(function() {
54+
webUI.webContents.on("deleteBranch", (name) => {
55+
executeSafely(function () {
5656
exec(`git branch -d ${name}`);
5757
UI.message(`Deleted branch '${name}'`);
5858
});
5959
});
6060
webUI.webContents.on("createBranch", () => {
61-
executeSafely(function() {
61+
executeSafely(function () {
6262
UI.getInputFromUser(
6363
"New Branch Name",
6464
{ okButton: "Create Branch" },

src/commands/Commit.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ import {
55
checkForFile,
66
executeSafely,
77
exec,
8-
createInputWithCheckbox
8+
createInputWithCheckbox,
99
} from "../common";
1010
import { exportArtboards } from "../exportArtboards";
1111
import { getUserPreferences } from "../preferences";
1212

13-
export default function() {
13+
export default function () {
1414
if (!checkForFile()) {
1515
return;
1616
}
17-
executeSafely(function() {
17+
executeSafely(function () {
1818
const currentBranch = getCurrentBranch();
1919
const prefs = getUserPreferences();
2020
const commitMsg = createInputWithCheckbox(

src/commands/Export.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ import { checkForFile, checkForGitRepository, executeSafely } from "../common";
44
import { exportArtboards } from "../exportArtboards";
55
import { getUserPreferences } from "../preferences";
66

7-
export default function() {
7+
export default function () {
88
if (!checkForFile() && !checkForGitRepository()) {
99
return;
1010
}
11-
executeSafely(function() {
11+
executeSafely(function () {
1212
exportArtboards(getUserPreferences());
1313
UI.message("Artboards exported");
1414
});

src/commands/Init.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ import {
55
getCurrentFileName,
66
executeSafely,
77
exec,
8-
createFailAlert
8+
createFailAlert,
99
} from "../common";
1010

11-
export default function() {
11+
export default function () {
1212
if (!checkForFile()) {
1313
return;
1414
}
15-
executeSafely(function() {
15+
executeSafely(function () {
1616
const currentFileName = getCurrentFileName();
1717
if (!currentFileName) {
1818
createFailAlert("Failed...", "Cannot get the current file name");
@@ -26,7 +26,7 @@ export default function() {
2626
{
2727
okButton: "Add Remote",
2828
cancelButton: "Not now",
29-
description: "you can create one here: https://github.com/new"
29+
description: "you can create one here: https://github.com/new",
3030
},
3131
(err, value) => {
3232
if (err) {

src/commands/OpenTerminal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { getCurrentDirectory } from "../common";
33
import { getUserPreferences } from "../preferences";
44

5-
export default function() {
5+
export default function () {
66
const path = getCurrentDirectory();
77
const { terminal } = getUserPreferences();
88
NSWorkspace.sharedWorkspace().openFile_withApplication_(path, terminal);

src/commands/Preferences.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import WebUI from "sketch-module-web-view";
44
import { executeSafely } from "../common";
55
import { getUserPreferences, setUserPreferences } from "../preferences";
66

7-
export default function() {
7+
export default function () {
88
const preferences = getUserPreferences();
99
const webUI = new WebUI({
1010
identifier: "git-sketch-plugin.preferences",
@@ -14,7 +14,7 @@ export default function() {
1414
minimizable: false,
1515
maximizable: false,
1616
titleBarStyle: "hidden",
17-
show: false
17+
show: false,
1818
});
1919

2020
webUI.loadURL(require("../../Resources/preferences.html"));
@@ -27,8 +27,8 @@ export default function() {
2727
webUI.webContents.executeJavaScript("window.ready=true");
2828
});
2929

30-
webUI.webContents.on("savePreferences", prefs => {
31-
executeSafely(function() {
30+
webUI.webContents.on("savePreferences", (prefs) => {
31+
executeSafely(function () {
3232
setUserPreferences(prefs);
3333
webUI.close();
3434
UI.message("Preferences updated");

src/commands/Pull.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
import { UI } from "sketch";
33
import { checkForFile, executeSafely, exec } from "../common";
44

5-
export default function() {
5+
export default function () {
66
if (!checkForFile()) {
77
return;
88
}
9-
executeSafely(function() {
9+
executeSafely(function () {
1010
exec("git pull -q");
1111
UI.message("Changes pulled");
1212
});

0 commit comments

Comments
 (0)