@unsetsoft/ryunixjs 0.2.31-nightly.0 → 0.2.31-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/bin/compiler.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // Can be imported from webpack package
2
- const webpack = require("webpack");
3
- const webpackConfig = require("../webpack.config.js");
2
+ import webpack from "webpack";
3
+ import * as webpackConfig from "../webpack.config.js";
4
4
  const compiler = webpack(webpackConfig);
5
5
 
6
- module.exports = { compiler };
6
+ export { compiler };
package/bin/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  #! /usr/bin/env node
2
- const yargs = require("yargs");
3
- const { hideBin } = require("yargs/helpers");
4
- const { StartServer } = require("./serve");
5
- const { compiler } = require("./compiler");
6
- const logger = require("terminal-log");
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
- const Webpack = require("webpack");
2
- const WebpackDevServer = require("webpack-dev-server");
3
- const webpackConfig = require("../webpack.config.js");
4
-
1
+ import Webpack from "webpack";
2
+ import WebpackDevServer from "webpack-dev-server";
3
+ import * as 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
- module.exports = { StartServer };
13
+ export { StartServer };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unsetsoft/ryunixjs",
3
- "version": "0.2.31-nightly.0",
3
+ "version": "0.2.31-nightly.10",
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,6 +50,7 @@
51
50
  "engines": {
52
51
  "node": ">=18.16.0"
53
52
  },
53
+ "type": "module",
54
54
  "keywords": [
55
55
  "ryunixjs"
56
56
  ]
package/utils/index.js CHANGED
@@ -24,6 +24,4 @@ function getPackageManager() {
24
24
  return "npm";
25
25
  }
26
26
 
27
- module.exports = {
28
- getPackageManager,
29
- };
27
+ export { getPackageManager };
package/webpack.config.js CHANGED
@@ -1,23 +1,27 @@
1
- const path = require("path");
2
- const HtmlWebpackPlugin = require("html-webpack-plugin");
3
- const ErrorOverlayPlugin = require("error-overlay-webpack-plugin");
4
- const { getPackageManager } = require("./utils");
5
- const RemarkHTML = require("remark-html");
1
+ import { fileURLToPath } from "url";
2
+ import { dirname, join, resolve } from "path";
3
+ import HtmlWebpackPlugin from "html-webpack-plugin";
4
+ import { getPackageManager } from "./utils/index.js";
5
+ import RemarkHTML from "remark-html";
6
+
7
+ const __filename = fileURLToPath(import.meta.url);
8
+
9
+ const __dirname = dirname(__filename);
6
10
 
7
11
  let dir;
8
12
  const manager = getPackageManager();
9
13
  if (manager === "yarn" || manager === "npm" || manager === "bun") {
10
- dir = path.dirname(path.resolve(path.join(__dirname, "..", "..")));
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
  module.exports = {
16
20
  mode: "production",
17
- entry: path.join(dir, "src", "main.ryx"),
21
+ entry: join(dir, "src", "main.ryx"),
18
22
  devtool: "nosources-source-map",
19
23
  output: {
20
- path: path.join(dir, ".ryunix"),
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: path.join(dir, "public", "index.html"),
119
+ template: join(dir, "public", "index.html"),
116
120
  }),
117
- new ErrorOverlayPlugin(),
118
121
  ],
119
122
  externals: {
120
123
  ryunix: "Ryunix",