@unsetsoft/ryunixjs 0.2.31-nightly.32 → 0.2.31-nightly.4

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.
@@ -1,6 +1,6 @@
1
1
  // Can be imported from webpack package
2
2
  import webpack from "webpack";
3
- import webpackConfig from "../webpack.config.mjs";
3
+ import webpackConfig from "../webpack.config.js";
4
4
  const compiler = webpack(webpackConfig);
5
5
 
6
- export { compiler };
6
+ module.exports = { compiler };
@@ -1,8 +1,8 @@
1
1
  #! /usr/bin/env node
2
2
  import yargs from "yargs";
3
3
  import { hideBin } from "yargs/helpers";
4
- import { StartServer } from "./serve.mjs";
5
- import { compiler } from "./compiler.mjs";
4
+ import { StartServer } from "./serve";
5
+ import { compiler } from "./compiler";
6
6
  import logger from "terminal-log";
7
7
  const serv = {
8
8
  command: "server",
@@ -1,6 +1,7 @@
1
1
  import Webpack from "webpack";
2
2
  import WebpackDevServer from "webpack-dev-server";
3
- import webpackConfig from "../webpack.config.mjs";
3
+ import webpackConfig from "../webpack.config.js";
4
+
4
5
 
5
6
  const StartServer = async (cliSettings) => {
6
7
  const compiler = Webpack(webpackConfig);
@@ -10,4 +11,4 @@ const StartServer = async (cliSettings) => {
10
11
  await server.start();
11
12
  };
12
13
 
13
- export { StartServer };
14
+ module.exports = { StartServer };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unsetsoft/ryunixjs",
3
- "version": "0.2.31-nightly.32",
3
+ "version": "0.2.31-nightly.4",
4
4
  "license": "MIT",
5
5
  "main": "./dist/Ryunix.js",
6
6
  "private": false,
@@ -12,12 +12,12 @@
12
12
  "build": "rollup ./src/main.js --file ./dist/Ryunix.js --format umd --name Ryunix",
13
13
  "prepublish": "npm run build",
14
14
  "postinstall": "npm run build",
15
- "cli": "node ./bin/index.mjs",
15
+ "cli": "node ./bin/index.js",
16
16
  "nightly:release": "npm publish --tag nightly",
17
17
  "release": "npm publish"
18
18
  },
19
19
  "bin": {
20
- "ryunix": "./bin/index.mjs"
20
+ "ryunix": "./bin/index.js"
21
21
  },
22
22
  "dependencies": {
23
23
  "@babel/cli": "7.19.3",
@@ -27,14 +27,16 @@
27
27
  "@babel/polyfill": "7.12.1",
28
28
  "@babel/preset-env": "^7.22.14",
29
29
  "@babel/preset-react": "^7.22.5",
30
- "@mdx-js/loader": "^2.3.0",
31
30
  "babel-loader": "^9.1.3",
32
31
  "css-loader": "^6.8.1",
32
+ "error-overlay-webpack-plugin": "^1.1.1",
33
33
  "file-loader": "^6.2.0",
34
34
  "html-loader": "^4.2.0",
35
35
  "html-webpack-plugin": "^5.5.3",
36
36
  "image-webpack-loader": "8.1.0",
37
37
  "node-sass": "9.0.0",
38
+ "remark-html": "^15.0.2",
39
+ "remark-loader": "^5.0.0",
38
40
  "rollup": "3.24.0",
39
41
  "sass": "^1.66.1",
40
42
  "sass-loader": "^13.3.2",
@@ -49,6 +51,7 @@
49
51
  "engines": {
50
52
  "node": ">=18.16.0"
51
53
  },
54
+ "type": "module",
52
55
  "keywords": [
53
56
  "ryunixjs"
54
57
  ]
package/src/main.js CHANGED
@@ -1,4 +1,4 @@
1
- import Ryunix from "./lib/index.js";
1
+ import Ryunix from "./lib/index";
2
2
 
3
3
  export {
4
4
  useStore,
@@ -8,7 +8,7 @@ export {
8
8
  Fragments,
9
9
  Navigate,
10
10
  Router,
11
- } from "./lib/index.js";
11
+ } from "./lib/index";
12
12
 
13
13
  window.Ryunix = Ryunix;
14
14
 
@@ -24,4 +24,6 @@ function getPackageManager() {
24
24
  return "npm";
25
25
  }
26
26
 
27
- export { getPackageManager };
27
+ module.exports = {
28
+ getPackageManager,
29
+ };
@@ -1,27 +1,23 @@
1
- import { fileURLToPath } from "url";
2
- import { dirname, join, resolve } from "path";
1
+ import path from "path";
3
2
  import HtmlWebpackPlugin from "html-webpack-plugin";
4
- import { getPackageManager } from "./utils/index.mjs";
5
-
6
-
7
- const __filename = fileURLToPath(import.meta.url);
8
-
9
- const __dirname = dirname(__filename);
3
+ import ErrorOverlayPlugin from "error-overlay-webpack-plugin";
4
+ import { getPackageManager } from "./utils";
5
+ import RemarkHTML from "remark-html";
10
6
 
11
7
  let dir;
12
8
  const manager = getPackageManager();
13
9
  if (manager === "yarn" || manager === "npm" || manager === "bun") {
14
- dir = dirname(resolve(join(__dirname, "..", "..")));
10
+ dir = path.dirname(path.resolve(path.join(__dirname, "..", "..")));
15
11
  } else if (manager === "pnpm") {
16
12
  throw new Error(`The manager ${manager} is not supported.`);
17
13
  }
18
14
 
19
- export default {
15
+ module.exports = {
20
16
  mode: "production",
21
- entry: join(dir, "src", "main.ryx"),
17
+ entry: path.join(dir, "src", "main.ryx"),
22
18
  devtool: "nosources-source-map",
23
19
  output: {
24
- path: join(dir, ".ryunix"),
20
+ path: path.join(dir, ".ryunix"),
25
21
  chunkFilename: "./assets/js/[name].[fullhash:8].bundle.js",
26
22
  filename: "./assets/js/[name].[fullhash:8].bundle.js",
27
23
  devtoolModuleFilenameTemplate: "ryunix/[resource-path]",
@@ -93,6 +89,22 @@ export default {
93
89
  loader: "url-loader",
94
90
  options: { limit: false },
95
91
  },
92
+ {
93
+ test: /\.md$/,
94
+ use: [
95
+ {
96
+ loader: "html-loader",
97
+ },
98
+ {
99
+ loader: "remark-loader",
100
+ options: {
101
+ remarkOptions: {
102
+ plugins: [RemarkHTML],
103
+ },
104
+ },
105
+ },
106
+ ],
107
+ },
96
108
  ],
97
109
  },
98
110
  resolve: {
@@ -100,8 +112,9 @@ export default {
100
112
  },
101
113
  plugins: [
102
114
  new HtmlWebpackPlugin({
103
- template: join(dir, "public", "index.html"),
115
+ template: path.join(dir, "public", "index.html"),
104
116
  }),
117
+ new ErrorOverlayPlugin(),
105
118
  ],
106
119
  externals: {
107
120
  ryunix: "Ryunix",