@unsetsoft/ryunixjs 0.2.31-nightly.2 → 0.2.31-nightly.21
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/bin/compiler.js +3 -3
- package/bin/index.js +5 -5
- package/bin/serve.js +4 -5
- package/package.json +1 -3
- package/src/main.js +2 -2
- package/utils/index.js +1 -3
- package/webpack.config.js +12 -9
package/bin/compiler.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Can be imported from webpack package
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import webpack from "webpack";
|
|
3
|
+
import webpackConfig from "../webpack.config.js";
|
|
4
4
|
const compiler = webpack(webpackConfig);
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
export { compiler };
|
package/bin/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#! /usr/bin/env node
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
import yargs from "yargs";
|
|
3
|
+
import { hideBin } from "yargs/helpers";
|
|
4
|
+
import { StartServer } from "./serve.js";
|
|
5
|
+
import { compiler } from "./compiler.js";
|
|
6
|
+
import logger from "terminal-log";
|
|
7
7
|
const serv = {
|
|
8
8
|
command: "server",
|
|
9
9
|
describe: "Run server",
|
package/bin/serve.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import Webpack from "webpack";
|
|
2
|
+
import WebpackDevServer from "webpack-dev-server";
|
|
3
|
+
import webpackConfig from "../webpack.config.js";
|
|
5
4
|
|
|
6
5
|
const StartServer = async (cliSettings) => {
|
|
7
6
|
const compiler = Webpack(webpackConfig);
|
|
@@ -11,4 +10,4 @@ const StartServer = async (cliSettings) => {
|
|
|
11
10
|
await server.start();
|
|
12
11
|
};
|
|
13
12
|
|
|
14
|
-
|
|
13
|
+
export { StartServer };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unsetsoft/ryunixjs",
|
|
3
|
-
"version": "0.2.31-nightly.
|
|
3
|
+
"version": "0.2.31-nightly.21",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./dist/Ryunix.js",
|
|
6
6
|
"private": false,
|
|
@@ -29,7 +29,6 @@
|
|
|
29
29
|
"@babel/preset-react": "^7.22.5",
|
|
30
30
|
"babel-loader": "^9.1.3",
|
|
31
31
|
"css-loader": "^6.8.1",
|
|
32
|
-
"error-overlay-webpack-plugin": "^1.1.1",
|
|
33
32
|
"file-loader": "^6.2.0",
|
|
34
33
|
"html-loader": "^4.2.0",
|
|
35
34
|
"html-webpack-plugin": "^5.5.3",
|
|
@@ -51,7 +50,6 @@
|
|
|
51
50
|
"engines": {
|
|
52
51
|
"node": ">=18.16.0"
|
|
53
52
|
},
|
|
54
|
-
"type": "module",
|
|
55
53
|
"keywords": [
|
|
56
54
|
"ryunixjs"
|
|
57
55
|
]
|
package/src/main.js
CHANGED
package/utils/index.js
CHANGED
package/webpack.config.js
CHANGED
|
@@ -1,23 +1,27 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { fileURLToPath } from "url";
|
|
2
|
+
import { dirname, join, resolve } from "path";
|
|
2
3
|
import HtmlWebpackPlugin from "html-webpack-plugin";
|
|
3
|
-
import
|
|
4
|
-
import { getPackageManager } from "./utils";
|
|
4
|
+
import { getPackageManager } from "./utils/index.js";
|
|
5
5
|
import RemarkHTML from "remark-html";
|
|
6
6
|
|
|
7
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
8
|
+
|
|
9
|
+
const __dirname = dirname(__filename);
|
|
10
|
+
|
|
7
11
|
let dir;
|
|
8
12
|
const manager = getPackageManager();
|
|
9
13
|
if (manager === "yarn" || manager === "npm" || manager === "bun") {
|
|
10
|
-
dir =
|
|
14
|
+
dir = dirname(resolve(join(__dirname, "..", "..")));
|
|
11
15
|
} else if (manager === "pnpm") {
|
|
12
16
|
throw new Error(`The manager ${manager} is not supported.`);
|
|
13
17
|
}
|
|
14
18
|
|
|
15
|
-
|
|
19
|
+
export default {
|
|
16
20
|
mode: "production",
|
|
17
|
-
entry:
|
|
21
|
+
entry: join(dir, "src", "main.ryx"),
|
|
18
22
|
devtool: "nosources-source-map",
|
|
19
23
|
output: {
|
|
20
|
-
path:
|
|
24
|
+
path: join(dir, ".ryunix"),
|
|
21
25
|
chunkFilename: "./assets/js/[name].[fullhash:8].bundle.js",
|
|
22
26
|
filename: "./assets/js/[name].[fullhash:8].bundle.js",
|
|
23
27
|
devtoolModuleFilenameTemplate: "ryunix/[resource-path]",
|
|
@@ -112,9 +116,8 @@ module.exports = {
|
|
|
112
116
|
},
|
|
113
117
|
plugins: [
|
|
114
118
|
new HtmlWebpackPlugin({
|
|
115
|
-
template:
|
|
119
|
+
template: join(dir, "public", "index.html"),
|
|
116
120
|
}),
|
|
117
|
-
new ErrorOverlayPlugin(),
|
|
118
121
|
],
|
|
119
122
|
externals: {
|
|
120
123
|
ryunix: "Ryunix",
|