Comparing version 0.0.1-alpha.1 to 0.0.1-alpha.2
32
index.js
const Module = require('./dist/zmakebas.js') | ||
module.exports = input => { | ||
return new Promise((resolve, reject) => { | ||
Module({ | ||
'input': input, | ||
'resolve': resolve, | ||
'arguments': ['-a', '0', '-o', 'output.tap', 'input.bas'] | ||
module.exports = (input, labelsMode) => { | ||
// Prepare args for the zmakebas command. | ||
const args = []; | ||
args.push('-a'); | ||
args.push('0'); | ||
if (labelsMode) args.push('-l'); | ||
args.push('-o'); | ||
args.push('output.tap'); | ||
args.push('input.bas'); | ||
// Collect output. | ||
const out = []; | ||
// Call the zmakebas module with data for command. | ||
return new Promise((resolve, reject) => { | ||
Module({ | ||
arguments: args, | ||
input, | ||
out, | ||
resolve, | ||
reject, | ||
print: (text) => out.push({type: 'out', text}), | ||
printErr: (text) => out.push({type: 'err', text}), | ||
}); | ||
}); | ||
}); | ||
} |
{ | ||
"name": "zmakebas", | ||
"version": "0.0.1-alpha.1", | ||
"version": "0.0.1-alpha.2", | ||
"main": "index.js", | ||
@@ -34,3 +34,3 @@ "license": "GPL-2.0+", | ||
"clean:all": "del-cli build dist", | ||
"test": "jest", | ||
"test": "jest --noStackTrace", | ||
"publish-pkg": "npm publish --access public" | ||
@@ -70,3 +70,4 @@ }, | ||
] | ||
} | ||
}, | ||
"dependencies": {} | ||
} |
@@ -19,3 +19,14 @@ # zmakebas | ||
Install & activate `emsdk` from Emscripten: | ||
```bash | ||
git clone https://github.com/emscripten-core/emsdk.git | ||
cd emsdk/ | ||
git pull | ||
./emsdk install latest | ||
./emsdk activate latest | ||
source ./emsdk_env.sh | ||
``` | ||
```bash | ||
npm install | ||
@@ -22,0 +33,0 @@ npm run build |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
100
130787
523