@unsetsoft/ryunixjs 0.2.37-nightly.1 → 0.2.37-nightly.10
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/dist/Ryunix.js +18 -13
- package/package.json +2 -1
- package/src/main.js +2 -1
- package/utils/config.cjs +8 -0
- package/webpack.config.mjs +8 -2
package/dist/Ryunix.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Ryunix = {}));
|
|
5
|
-
})(this, (function (exports) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('express'), require('cors')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'express', 'cors'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Ryunix = {}, global.express, global.cors));
|
|
5
|
+
})(this, (function (exports, express, cors) { 'use strict';
|
|
6
6
|
|
|
7
7
|
const vars = {
|
|
8
8
|
containerRoot: null,
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
* @param root - The parameter "root" is the id of the HTML element that will serve as the container
|
|
120
120
|
* for the root element.
|
|
121
121
|
*/
|
|
122
|
-
const init = (root) => {
|
|
122
|
+
const init$1 = (root) => {
|
|
123
123
|
const rootElement = root || "__ryunix";
|
|
124
124
|
vars.containerRoot = document.getElementById(rootElement);
|
|
125
125
|
};
|
|
@@ -281,13 +281,7 @@
|
|
|
281
281
|
Provider: null,
|
|
282
282
|
};
|
|
283
283
|
|
|
284
|
-
context.Provider = (value) =>
|
|
285
|
-
const provider = {
|
|
286
|
-
value: value,
|
|
287
|
-
};
|
|
288
|
-
|
|
289
|
-
return createElement("div", provider, props.children);
|
|
290
|
-
};
|
|
284
|
+
context.Provider = (value) => (context.Value = value);
|
|
291
285
|
|
|
292
286
|
return context;
|
|
293
287
|
};
|
|
@@ -672,7 +666,7 @@
|
|
|
672
666
|
var Ryunix = {
|
|
673
667
|
createElement,
|
|
674
668
|
render,
|
|
675
|
-
init,
|
|
669
|
+
init: init$1,
|
|
676
670
|
Fragments,
|
|
677
671
|
Dom,
|
|
678
672
|
Workers,
|
|
@@ -681,11 +675,22 @@
|
|
|
681
675
|
Commits,
|
|
682
676
|
};
|
|
683
677
|
|
|
678
|
+
const route = express();
|
|
679
|
+
|
|
680
|
+
const useCors = (config = {}) => app.use(cors(config));
|
|
681
|
+
const init = (port) =>
|
|
682
|
+
route.listen(port, () => {
|
|
683
|
+
console.log("Server is runing at: https://localhost:" + port);
|
|
684
|
+
});
|
|
685
|
+
|
|
686
|
+
var index = { useCors, route, init };
|
|
687
|
+
|
|
684
688
|
window.Ryunix = Ryunix;
|
|
685
689
|
|
|
686
690
|
exports.Fragments = Fragments;
|
|
687
691
|
exports.Navigate = Navigate;
|
|
688
692
|
exports.Router = Router;
|
|
693
|
+
exports.Server = index;
|
|
689
694
|
exports.createContext = createContext;
|
|
690
695
|
exports.default = Ryunix;
|
|
691
696
|
exports.useContext = useContext;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unsetsoft/ryunixjs",
|
|
3
|
-
"version": "0.2.37-nightly.
|
|
3
|
+
"version": "0.2.37-nightly.10",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./dist/Ryunix.js",
|
|
6
6
|
"private": false,
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"crypto": "^1.0.1",
|
|
33
33
|
"css-loader": "^6.8.1",
|
|
34
34
|
"file-loader": "^6.2.0",
|
|
35
|
+
"glob": "^10.3.7",
|
|
35
36
|
"html-loader": "^4.2.0",
|
|
36
37
|
"html-webpack-plugin": "^5.5.3",
|
|
37
38
|
"image-webpack-loader": "8.1.0",
|
package/src/main.js
CHANGED
package/utils/config.cjs
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
const config = require("../../../../ryunix.config.js");
|
|
2
|
+
console.log(config);
|
|
3
|
+
const defaultSettings = {
|
|
4
|
+
buildDirectory: config?.buildDirectory ? config.buildDirectory : ".ryunix",
|
|
5
|
+
appDirectory: config?.appDirectory ? config.appDirectory : "src",
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
module.exports = defaultSettings;
|
package/webpack.config.mjs
CHANGED
|
@@ -13,6 +13,7 @@ const __filename = fileURLToPath(import.meta.url);
|
|
|
13
13
|
const __dirname = dirname(__filename);
|
|
14
14
|
|
|
15
15
|
let dir;
|
|
16
|
+
|
|
16
17
|
const manager = getPackageManager();
|
|
17
18
|
if (manager === "yarn" || manager === "npm" || manager === "bun") {
|
|
18
19
|
dir = dirname(join(__dirname, "..", ".."));
|
|
@@ -20,12 +21,17 @@ if (manager === "yarn" || manager === "npm" || manager === "bun") {
|
|
|
20
21
|
throw new Error(`The manager ${manager} is not supported.`);
|
|
21
22
|
}
|
|
22
23
|
|
|
24
|
+
import config from "./utils/config.cjs";
|
|
25
|
+
|
|
26
|
+
console.log(config);
|
|
27
|
+
|
|
23
28
|
export default {
|
|
24
29
|
mode: "production",
|
|
25
|
-
|
|
30
|
+
context: resolve(dir, config.appDirectory),
|
|
31
|
+
entry: "./main.ryx",
|
|
26
32
|
devtool: "nosources-source-map",
|
|
27
33
|
output: {
|
|
28
|
-
path: join(dir,
|
|
34
|
+
path: join(dir, config.buildDirectory),
|
|
29
35
|
chunkFilename: "./assets/js/[name].[fullhash:8].bundle.js",
|
|
30
36
|
assetModuleFilename: "./assets/media/[name].[hash][ext]",
|
|
31
37
|
filename: "./assets/js/[name].[fullhash:8].bundle.js",
|