@unsetsoft/ryunixjs 0.2.6-alpha.1 → 0.2.6-alpha.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/.babelrc +20 -0
- package/bin/index.js +12 -0
- package/bin/serve.js +9 -0
- package/package.json +24 -3
- package/webpack.config.js +50 -0
package/.babelrc
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"presets": [
|
|
3
|
+
"@babel/preset-env",
|
|
4
|
+
[
|
|
5
|
+
"@babel/preset-react",
|
|
6
|
+
{
|
|
7
|
+
"runtime": "automatic"
|
|
8
|
+
}
|
|
9
|
+
]
|
|
10
|
+
],
|
|
11
|
+
"plugins": [
|
|
12
|
+
[
|
|
13
|
+
"@babel/plugin-transform-react-jsx",
|
|
14
|
+
{
|
|
15
|
+
"pragma": "Ryunix.createElement"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"@babel/plugin-proposal-class-properties"
|
|
19
|
+
]
|
|
20
|
+
}
|
package/bin/index.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#! /usr/bin/env node
|
|
2
|
+
const yargs = require("yargs");
|
|
3
|
+
const { hideBin } = require("yargs/helpers");
|
|
4
|
+
const { server } = require("./serve");
|
|
5
|
+
const serv = {
|
|
6
|
+
command: "server",
|
|
7
|
+
describe: "Run server",
|
|
8
|
+
handler: async (arg) => {
|
|
9
|
+
await server.start();
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
yargs(hideBin(process.argv)).command(serv).parse();
|
package/bin/serve.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const Webpack = require("webpack");
|
|
2
|
+
const WebpackDevServer = require("webpack-dev-server");
|
|
3
|
+
const webpackConfig = require("../webpack.config.js");
|
|
4
|
+
|
|
5
|
+
const compiler = Webpack(webpackConfig);
|
|
6
|
+
const devServerOptions = { ...webpackConfig.devServer, open: true };
|
|
7
|
+
const server = new WebpackDevServer(devServerOptions, compiler);
|
|
8
|
+
|
|
9
|
+
module.exports = { server };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unsetsoft/ryunixjs",
|
|
3
|
-
"version": "0.2.6-alpha.
|
|
3
|
+
"version": "0.2.6-alpha.10",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./dist/Ryunix.js",
|
|
6
6
|
"private": false,
|
|
@@ -12,10 +12,31 @@
|
|
|
12
12
|
"build": "rollup ./lib/main.js --file ./dist/Ryunix.js --format umd --name Ryunix",
|
|
13
13
|
"postinstall": "yarn build"
|
|
14
14
|
},
|
|
15
|
+
"bin": {
|
|
16
|
+
"ryunix": "./bin/index.js"
|
|
17
|
+
},
|
|
15
18
|
"dependencies": {
|
|
16
|
-
"rollup": "3.24.0"
|
|
19
|
+
"rollup": "3.24.0",
|
|
20
|
+
"yargs": "^17.7.2",
|
|
21
|
+
"webpack": "^5.86.0",
|
|
22
|
+
"@babel/core": "^7.22.5",
|
|
23
|
+
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
24
|
+
"@babel/plugin-transform-react-jsx": "^7.22.5",
|
|
25
|
+
"@babel/preset-env": "^7.22.5",
|
|
26
|
+
"@babel/preset-react": "^7.22.5",
|
|
27
|
+
"babel-loader": "^9.1.2",
|
|
28
|
+
"css-loader": "6.8.1",
|
|
29
|
+
"error-overlay-webpack-plugin": "^1.1.1",
|
|
30
|
+
"file-loader": "^6.2.0",
|
|
31
|
+
"html-webpack-plugin": "^5.5.2",
|
|
32
|
+
"image-webpack-loader": "8.1.0",
|
|
33
|
+
"node-sass": "9.0.0",
|
|
34
|
+
"sass-loader": "13.3.2",
|
|
35
|
+
"style-loader": "3.3.3",
|
|
36
|
+
"webpack-cli": "^5.1.4",
|
|
37
|
+
"webpack-dev-server": "^4.15.1"
|
|
17
38
|
},
|
|
18
39
|
"engines": {
|
|
19
40
|
"node": ">=18.16.0"
|
|
20
41
|
}
|
|
21
|
-
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
const path = require("path");
|
|
2
|
+
const HtmlWebpackPlugin = require("html-webpack-plugin");
|
|
3
|
+
const ErrorOverlayPlugin = require("error-overlay-webpack-plugin");
|
|
4
|
+
|
|
5
|
+
const __filename = require.main.filename;
|
|
6
|
+
const __dirname = dirname(__filename);
|
|
7
|
+
const __path = (route) => join(__dirname, route);
|
|
8
|
+
console.log(__path("/src/main.ryx"));
|
|
9
|
+
|
|
10
|
+
module.exports = {
|
|
11
|
+
mode: process.env.NODE_ENV !== "production" ? "development" : "production",
|
|
12
|
+
entry: path.resolve(dir, "src", "main.ryx"),
|
|
13
|
+
output: {
|
|
14
|
+
path: path.resolve(dir, ".ryunix"),
|
|
15
|
+
filename: "./assets/js/[chunkhash].bundle.js",
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
module: {
|
|
19
|
+
rules: [
|
|
20
|
+
{
|
|
21
|
+
test: /\.(js|jsx|ts|tsx|ryx)$/,
|
|
22
|
+
exclude: /node_modules/,
|
|
23
|
+
use: {
|
|
24
|
+
loader: "babel-loader",
|
|
25
|
+
options: {
|
|
26
|
+
presets: ["@babel/preset-env", "@babel/preset-react"],
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
test: /\.(css|scss)$/,
|
|
32
|
+
use: ["style-loader", "css-loader"],
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
test: /\.(jpg|jpeg|png|gif|mp3|svg|mp4)$/,
|
|
36
|
+
use: ["file-loader"],
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
resolve: {
|
|
41
|
+
extensions: ["*", ".js", ".jsx", ".ts", ".tsx", ".ryx"],
|
|
42
|
+
},
|
|
43
|
+
plugins: [
|
|
44
|
+
new HtmlWebpackPlugin({
|
|
45
|
+
template: path.join(dir, "public", "index.html"),
|
|
46
|
+
//favicon: path.join(dir, "public", "favicon.ico"),
|
|
47
|
+
}),
|
|
48
|
+
new ErrorOverlayPlugin(),
|
|
49
|
+
],
|
|
50
|
+
};
|