@bildit-platform/engine 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -7
- package/package.json +12 -9
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# @bildit/engine
|
|
1
|
+
# @bildit-platform/engine
|
|
2
2
|
|
|
3
|
-
**@bildit/engine** is a dynamic module engine that allows you to evaluate and interpret module code on the fly in a controlled environment. It automatically registers a global module creator and injects specific dependencies into dynamically evaluated modules.
|
|
3
|
+
**@bildit-platform/engine** is a dynamic module engine that allows you to evaluate and interpret module code on the fly in a controlled environment. It automatically registers a global module creator and injects specific dependencies into dynamically evaluated modules.
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
@@ -13,22 +13,22 @@
|
|
|
13
13
|
Install via npm:
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
npm install @bildit/engine
|
|
16
|
+
npm install @bildit-platform/engine
|
|
17
17
|
```
|
|
18
18
|
Or via yarn:
|
|
19
19
|
```bash
|
|
20
|
-
yarn add @bildit/engine
|
|
20
|
+
yarn add @bildit-platform/engine
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## Usage
|
|
24
|
-
When you import @bildit/engine, it automatically registers a global module creator on globalThis (or window in browsers) and sets up the React dependency. The library provides two main functions: interpretModuleString and createModuleWithDependencies.
|
|
24
|
+
When you import @bildit-platform/engine, it automatically registers a global module creator on globalThis (or window in browsers) and sets up the React dependency. The library provides two main functions: interpretModuleString and createModuleWithDependencies.
|
|
25
25
|
|
|
26
26
|
### Global Registration & Module Interpretation
|
|
27
27
|
The library registers a global define function that you can use for dynamic module creation. The helper function interpretModuleString evaluates a module code string and returns the desired export.
|
|
28
28
|
|
|
29
29
|
#### Example
|
|
30
30
|
```javascript
|
|
31
|
-
import {interpretModuleString} from '@bildit/engine/react';
|
|
31
|
+
import {interpretModuleString} from '@bildit-platform/engine/react';
|
|
32
32
|
|
|
33
33
|
const moduleCode = `
|
|
34
34
|
({
|
|
@@ -46,7 +46,7 @@ console.log(extraExport); // Outputs: Additional export
|
|
|
46
46
|
|
|
47
47
|
### Dependency Injection with createModuleWithDependencies
|
|
48
48
|
```javascript
|
|
49
|
-
import {createModuleWithDependencies} from '@bildit/engine/react';
|
|
49
|
+
import {createModuleWithDependencies} from '@bildit-platform/engine/react';
|
|
50
50
|
|
|
51
51
|
const moduleExports = createModuleWithDependencies(
|
|
52
52
|
['exports', 'react', 'react/jsx-runtime'],
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bildit-platform/engine",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "BILDIT Render Engine",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
7
7
|
],
|
|
@@ -29,7 +29,10 @@
|
|
|
29
29
|
"keywords": [
|
|
30
30
|
"bildit",
|
|
31
31
|
"cms",
|
|
32
|
-
"
|
|
32
|
+
"core",
|
|
33
|
+
"engine",
|
|
34
|
+
"business",
|
|
35
|
+
"logic",
|
|
33
36
|
"react"
|
|
34
37
|
],
|
|
35
38
|
"author": "BILDIT",
|
|
@@ -38,8 +41,8 @@
|
|
|
38
41
|
],
|
|
39
42
|
"license": "UNLICENSED",
|
|
40
43
|
"peerDependencies": {
|
|
41
|
-
"react": "
|
|
42
|
-
"react-dom": "
|
|
44
|
+
"react": ">=18.0.0",
|
|
45
|
+
"react-dom": ">=18.0.0"
|
|
43
46
|
},
|
|
44
47
|
"devDependencies": {
|
|
45
48
|
"@rollup/plugin-commonjs": "^24.0.0",
|
|
@@ -47,9 +50,9 @@
|
|
|
47
50
|
"@rollup/plugin-typescript": "^11.0.0",
|
|
48
51
|
"@types/jest": "^29.5.14",
|
|
49
52
|
"@types/node": "^22.13.14",
|
|
50
|
-
"@types/react": "
|
|
51
|
-
"@types/react-dom": "
|
|
52
|
-
"@types/react-is": "
|
|
53
|
+
"@types/react": ">=18.0.0",
|
|
54
|
+
"@types/react-dom": ">=18.0.0",
|
|
55
|
+
"@types/react-is": ">=18.0.0",
|
|
53
56
|
"eslint": "^8.0.0",
|
|
54
57
|
"rimraf": "^4.0.0",
|
|
55
58
|
"rollup": "^3.0.0",
|
|
@@ -57,6 +60,6 @@
|
|
|
57
60
|
"typescript": "^5.0.0"
|
|
58
61
|
},
|
|
59
62
|
"dependencies": {
|
|
60
|
-
"react-is": "
|
|
63
|
+
"react-is": ">=18.0.0"
|
|
61
64
|
}
|
|
62
65
|
}
|