starlight-cli 1.1.7 → 1.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +6 -4
- package/package.json +1 -1
- package/src/starlight.js +6 -4
package/dist/index.js
CHANGED
|
@@ -12507,7 +12507,7 @@ const Lexer = __nccwpck_require__(211);
|
|
|
12507
12507
|
const Parser = __nccwpck_require__(222);
|
|
12508
12508
|
const Evaluator = __nccwpck_require__(112);
|
|
12509
12509
|
|
|
12510
|
-
const VERSION = '1.1.
|
|
12510
|
+
const VERSION = '1.1.8';
|
|
12511
12511
|
|
|
12512
12512
|
const COLOR = {
|
|
12513
12513
|
reset: '\x1b[0m',
|
|
@@ -12804,18 +12804,20 @@ async function runFile(filePath, isTemp = false, callback) {
|
|
|
12804
12804
|
try { fs.unlinkSync(filePath); } catch {}
|
|
12805
12805
|
}
|
|
12806
12806
|
}
|
|
12807
|
-
|
|
12808
|
-
|
|
12809
12807
|
if (!args[0].startsWith('--')) {
|
|
12810
12808
|
const file = path.resolve(args[0]);
|
|
12811
12809
|
const ext = path.extname(file).toLowerCase();
|
|
12812
12810
|
|
|
12813
12811
|
if (ext === '.md') {
|
|
12814
12812
|
renderMarkdown(file);
|
|
12815
|
-
} else {
|
|
12813
|
+
} else if (ext === '.sl') {
|
|
12816
12814
|
runFile(file);
|
|
12815
|
+
} else {
|
|
12816
|
+
console.error(COLOR.red + 'Incorrect file extension. Create .sl or .md to be able to run correctly.' + COLOR.reset);
|
|
12817
|
+
waitAndExit(1);
|
|
12817
12818
|
}
|
|
12818
12819
|
}
|
|
12820
|
+
|
|
12819
12821
|
|
|
12820
12822
|
module.exports = __webpack_exports__;
|
|
12821
12823
|
/******/ })()
|
package/package.json
CHANGED
package/src/starlight.js
CHANGED
|
@@ -12,7 +12,7 @@ const Lexer = require('./lexer');
|
|
|
12
12
|
const Parser = require('./parser');
|
|
13
13
|
const Evaluator = require('./evaluator');
|
|
14
14
|
|
|
15
|
-
const VERSION = '1.1.
|
|
15
|
+
const VERSION = '1.1.8';
|
|
16
16
|
|
|
17
17
|
const COLOR = {
|
|
18
18
|
reset: '\x1b[0m',
|
|
@@ -309,15 +309,17 @@ async function runFile(filePath, isTemp = false, callback) {
|
|
|
309
309
|
try { fs.unlinkSync(filePath); } catch {}
|
|
310
310
|
}
|
|
311
311
|
}
|
|
312
|
-
|
|
313
|
-
|
|
314
312
|
if (!args[0].startsWith('--')) {
|
|
315
313
|
const file = path.resolve(args[0]);
|
|
316
314
|
const ext = path.extname(file).toLowerCase();
|
|
317
315
|
|
|
318
316
|
if (ext === '.md') {
|
|
319
317
|
renderMarkdown(file);
|
|
320
|
-
} else {
|
|
318
|
+
} else if (ext === '.sl') {
|
|
321
319
|
runFile(file);
|
|
320
|
+
} else {
|
|
321
|
+
console.error(COLOR.red + 'Incorrect file extension. Create .sl or .md to be able to run correctly.' + COLOR.reset);
|
|
322
|
+
waitAndExit(1);
|
|
322
323
|
}
|
|
323
324
|
}
|
|
325
|
+
|