formulahendry / formulahendry/vscode-code-runner

Use code runner on selected lines with preload of some node libraries

Open
#568 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
2.4k
Forks
351
PR merge metrics
No merged PRs in 30d

Description

Hi, great job on plugin !

i looked for issue who explain if it's possible to preload require library before execute piece of code.

Actually select this in my file for test :
```
const {mocks} = require('../mock/index')
var jsonata = require("jsonata");
console.log(jsonata(`products.description`).evaluate(mocks.products));
```

It's possible to always preload

```
const {mocks} = require('../mock/index')
var jsonata = require("jsonata");
```

So in file i will can select only
```
console.log(jsonata(`products.description`).evaluate(mocks.products));
```

with code-runner.executorMap maybe ?

Thanks !

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.