Skip to content

Commit 9e55e11

Browse files
authored
Merge pull request #194 from easycoder/dev
Modify 'iwsy init' to take path
2 parents fa53a9b + 801600e commit 9e55e11

File tree

2 files changed

+26
-18
lines changed

2 files changed

+26
-18
lines changed

dist/plugins/iwsy.js

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,19 @@ const EasyCoder_IWSY = {
3030
}
3131
break;
3232
case `init`:
33-
const cdn = compiler.getNextValue();
34-
compiler.addCommand({
35-
domain: `iwsy`,
36-
keyword: `iwsy`,
37-
lino,
38-
action,
39-
cdn
40-
});
41-
return true;
33+
try {
34+
const cdn = compiler.getNextValue();
35+
compiler.addCommand({
36+
domain: `iwsy`,
37+
keyword: `iwsy`,
38+
lino,
39+
action,
40+
cdn
41+
});
42+
return true;
43+
} catch (err) {
44+
throw Error(`iwsy init: No CDN URL given`);
45+
}
4246
case `stop`:
4347
compiler.next();
4448
compiler.addCommand({

js/plugins/iwsy.js

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,19 @@ const EasyCoder_IWSY = {
3030
}
3131
break;
3232
case `init`:
33-
const cdn = compiler.getNextValue();
34-
compiler.addCommand({
35-
domain: `iwsy`,
36-
keyword: `iwsy`,
37-
lino,
38-
action,
39-
cdn
40-
});
41-
return true;
33+
try {
34+
const cdn = compiler.getNextValue();
35+
compiler.addCommand({
36+
domain: `iwsy`,
37+
keyword: `iwsy`,
38+
lino,
39+
action,
40+
cdn
41+
});
42+
return true;
43+
} catch (err) {
44+
throw Error(`iwsy init: No CDN URL given`);
45+
}
4246
case `stop`:
4347
compiler.next();
4448
compiler.addCommand({

0 commit comments

Comments
 (0)