Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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)
- Host: GitHub
- URL: https://github.com/huruji/v8-load-js-file
- Owner: huruji
- Created: 2021-10-03T16:37:10.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-10-03T17:28:39.000Z (about 3 years ago)
- Last Synced: 2024-06-20T04:15:19.508Z (5 months ago)
- Language: C++
- Homepage:
- Size: 17.9 MB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-github-star - v8-load-js-file
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
```