Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/huruji/v8-load-js-file

v8 嵌入C++ 应用中并实现模块化加载 js 文件的例子(commonjs)
https://github.com/huruji/v8-load-js-file

Last synced: 3 months ago
JSON representation

v8 嵌入C++ 应用中并实现模块化加载 js 文件的例子(commonjs)

Awesome Lists containing this project

README

        

# v8-load-js-file

v8 嵌入 C++ 应用中并实现模块化加载 js 文件的例子(commonjs)

> app.js

```js
const test = require('test/test.js')

log(test.a)
log(test.add(2,3))
```

> test.js

```js
function add (a, b) {
return a + b;
}
module.exports = {
a: test,
add,
}
```

运行

```bash
./demo test/app.js
```