Skip to content

Commit 5c614f8

Browse files
committed
added config setup
1 parent ba3fbf3 commit 5c614f8

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jspython-cli",
3-
"version": "2.0.7",
3+
"version": "2.0.8",
44
"description": "CLI for jspython. Allows you to run jspython (*.jspy) files",
55
"main": "src/index.ts",
66
"bin": {

src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { jsPython, Interpreter, PackageLoader } from 'jspython-interpreter';
55
const pkg = require('../package.json');
66
const appConfig = require(`${process.cwd().split('\\').join('/')}/jspy.config.js`)
77
|| require(`${process.cwd().split('\\').join('/')}/jspy.config.json`)
8+
|| {};
89

910
const context: any = {
1011
asserts: [],
@@ -50,7 +51,7 @@ async function run() {
5051
context.asserts.length = 0;
5152
console.log(interpreter.jsPythonInfo())
5253
console.log(`> ${options.file}`)
53-
const res = await interpreter.evaluate(scripts, undefined, undefined, options.file);
54+
const res = await interpreter.evaluate(scripts, appConfig, undefined, options.file);
5455
if (res !== null) {
5556
console.log(res);
5657
}

0 commit comments

Comments
 (0)