-
-
Notifications
You must be signed in to change notification settings - Fork 1
Getting started
Vitali Haradkou edited this page Oct 7, 2021
·
1 revision
setup (cli):
npm i @magiqan/cli -D
goto package.json file:
{
"name": "some name",
"scripts":{
"build": "tsc",
"run:ts": "magiqan run **/tests/*.test.ts" // run ts files
"run:js": "npm run build && magiqan run **/tests/*.test.ts" // compile and run js files
},
"devDependencies":{
"@magiqan/cli": "0.0.0" // npm i define dependency
}
}setup (programming usage):
npm i @magiqan/runner
In your entry file:
// src/index.ts
import {Runner} from '@magiqan/runner';
const runner = new Runner();
async function run(){
runner.addFile('./test.ts'); // or runner.addFile('./test.compiled.js');
await runner.addGlob('pattern/*.ts'); // calling glob is always async
runner.run(); // run all resolved files
}
run();// run immideately MagiQAn