Skip to content

Commit 434590e

Browse files
committed
Made Working
1 parent 64ddd31 commit 434590e

6 files changed

Lines changed: 84 additions & 101 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,10 @@ jobs:
1515
- name: Build
1616
run: |
1717
yarn install
18-
node_modules/.bin/webpack --config webpack.config.js
19-
cp -r build /build
20-
rm -rf /src
21-
22-
- name: Sigin to git
23-
run: |
24-
git config --local user.email "action@github.com"
25-
git config --local user.name "GitHub Action"
26-
27-
- name: Commit
28-
run: |
29-
git add .
30-
git commit -m "GitHub Actions"
31-
32-
- name: Push commit
33-
uses: ad-m/github-push-action@master
34-
with:
35-
github_token: ${{ secrets.GITHUB_TOKEN }}
36-
branch: "gh-pages"
18+
yarn build
19+
20+
- name: Deploy 🚀
21+
uses: JamesIves/github-pages-deploy-action@v4.2.3
22+
with:
23+
branch: gh-pages # The branch the action should deploy to.
24+
folder: build # The folder the action should deploy.

‎package.json‎

Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,54 @@
11
{
2-
"name": "@modifiedcommand/convert-minecraft-java-texture-to-bedrock-webapp",
3-
"productName": "ConvertJavaTextureToBedrockWebApp",
4-
"version": "4.2.0",
5-
"description": "Web app for converting Minecraft Java texture packs to Bedrock texture packs",
6-
"keywords": [
7-
"Minecraft",
8-
"Texture",
9-
"Pack",
10-
"Convert",
11-
"Java",
12-
"Bedrock"
13-
],
14-
"author": "modifiedcommand",
15-
"license": "GPL-3.0-only",
16-
"repository": {
17-
"type": "git",
18-
"url": "git+https://github.com/ModifiedCommand/ConvertJavaTextureToBedrock.git"
19-
},
20-
"bugs": {
21-
"url": "https://github.com/ModifiedCommand/ConvertJavaTextureToBedrock/issues"
22-
},
23-
"homepage": "https://github.com/ModifiedCommand/ConvertJavaTextureToBedrock#readme",
24-
"dependencies": {},
25-
"devDependencies": {
26-
"@modifiedcommand/convert-minecraft-java-texture-to-bedrock-api": "github:ModifiedCommand/ConvertJavaTextureToBedrockApi#v4.0.7",
27-
"clean-webpack-plugin": "3.0.0",
28-
"css-loader": "3.4.2",
29-
"favicons-webpack-plugin": "1.0.2",
30-
"file-saver": "https://github.com/eligrey/FileSaver.js/tarball/9a0a1e4ae2732c2d8eedc0214ef1c0fa32d15150",
31-
"html-webpack-plugin": "3.2.0",
32-
"less": "3.11.1",
33-
"less-loader": "5.0.0",
34-
"materialize-css": "1.0.0",
35-
"mini-css-extract-plugin": "0.8.2",
36-
"offline-plugin": "5.0.7",
37-
"optimize-css-assets-webpack-plugin": "5.0.3",
38-
"path-browserify": "1.0.1",
39-
"sweetalert": "2.1.2",
40-
"webpack": "4.42.0",
41-
"webpack-cli": "3.3.12",
42-
"worker-loader": "2.0.0"
43-
},
44-
"resolutions": {
45-
"sharp": "0.25.3"
46-
},
47-
"engines": {
48-
"node": ">=14.0.0"
49-
},
50-
"scripts": {
51-
"build": "node_modules/.bin/webpack --config webpack.config.js"
52-
},
53-
"private": false
54-
}
2+
"name": "@modifiedcommand/convert-minecraft-java-texture-to-bedrock-webapp",
3+
"productName": "ConvertJavaTextureToBedrockWebApp",
4+
"version": "4.2.0",
5+
"description": "Web app for converting Minecraft Java texture packs to Bedrock texture packs",
6+
"keywords": [
7+
"Minecraft",
8+
"Texture",
9+
"Pack",
10+
"Convert",
11+
"Java",
12+
"Bedrock"
13+
],
14+
"author": "modifiedcommand",
15+
"license": "GPL-3.0-only",
16+
"repository": {
17+
"type": "git",
18+
"url": "git+https://github.com/ModifiedCommand/ConvertJavaTextureToBedrock.git"
19+
},
20+
"bugs": {
21+
"url": "https://github.com/ModifiedCommand/ConvertJavaTextureToBedrock/issues"
22+
},
23+
"homepage": "https://github.com/ModifiedCommand/ConvertJavaTextureToBedrock#readme",
24+
"dependencies": {},
25+
"devDependencies": {
26+
"@modifiedcommand/convert-minecraft-java-texture-to-bedrock-api": "github:ModifiedCommand/ConvertJavaTextureToBedrockApi#v4.0.7",
27+
"clean-webpack-plugin": "3.0.0",
28+
"css-loader": "3.4.2",
29+
"favicons-webpack-plugin": "1.0.2",
30+
"file-saver": "https://github.com/eligrey/FileSaver.js/tarball/9a0a1e4ae2732c2d8eedc0214ef1c0fa32d15150",
31+
"html-webpack-plugin": "3.2.0",
32+
"less": "3.11.1",
33+
"less-loader": "5.0.0",
34+
"materialize-css": "1.0.0",
35+
"mini-css-extract-plugin": "0.8.2",
36+
"offline-plugin": "5.0.7",
37+
"optimize-css-assets-webpack-plugin": "5.0.3",
38+
"path-browserify": "1.0.1",
39+
"sweetalert": "2.1.2",
40+
"webpack": "4.42.0",
41+
"webpack-cli": "3.3.12",
42+
"worker-loader": "1.1.1"
43+
},
44+
"resolutions": {
45+
"sharp": "0.25.3"
46+
},
47+
"engines": {
48+
"node": ">=14.0.0"
49+
},
50+
"scripts": {
51+
"build": "node_modules/.bin/webpack --config webpack.config.js"
52+
},
53+
"private": false
54+
}

‎src/js/index.mjs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import fileSaver from "file-saver";
22
import OfflinePluginRuntime from "offline-plugin/runtime";
33
import swal from "sweetalert";
4-
import { Worker } from "./worker.js";
4+
import Worker from "./worker.js";
55
import "./../css/style.less";
66

77
document.addEventListener("DOMContentLoaded", () => {
@@ -163,7 +163,7 @@ document.addEventListener("DOMContentLoaded", () => {
163163
* @returns {Promise<>}
164164
*/
165165
async function afterConvert(e) {
166-
const {log, log_color_class, output} = e.data;
166+
const { log, log_color_class, output } = e.data;
167167

168168
if (log) {
169169
_log(log, log_color_class);
@@ -227,4 +227,4 @@ document.addEventListener("DOMContentLoaded", () => {
227227

228228
logs.scrollTop = logs.scrollHeight; // Scroll to bottom
229229
}
230-
});
230+
});

‎src/js/worker.js‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import {AbstractLog, ArrayInput, FileInputEntry, FileOutput} from "@geekcornernpm/convert-base-api";
2-
import {ConvertJavaTextureToBedrockApi} from "@modifiedcommand/convert-minecraft-java-texture-to-bedrock-api";
1+
import { AbstractLog, ArrayInput, FileInputEntry, FileOutput } from "@geekcornernpm/convert-base-api";
2+
import { ConvertJavaTextureToBedrockApi } from "@modifiedcommand/convert-minecraft-java-texture-to-bedrock-api";
33

44
addEventListener("message", async e => {
55
try {
6-
const {files, options} = e.data;
6+
const { files, options } = e.data;
77

88
const output = {
99
output: await new ConvertJavaTextureToBedrockApi(
@@ -16,7 +16,7 @@ addEventListener("message", async e => {
1616
* @param {string|undefined} log_color_class
1717
*/
1818
log(log, log_color_class = undefined) {
19-
postMessage({log, log_color_class})
19+
postMessage({ log, log_color_class })
2020
}
2121

2222
/**
@@ -39,4 +39,4 @@ addEventListener("message", async e => {
3939
throw err;
4040
})
4141
}
42-
});
42+
});

‎update_gh-pages.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ cd ../webapp-gh-pages
33

44
rm -rf $(ls -a -I '.' -I '..' -I '.git')
55

6-
docker pull ModifiedCommand/convert-minecraft-java-texture-to-bedrock-webapp
6+
docker pull modifiedcommand/convert-minecraft-java-texture-to-bedrock-webapp
77

8-
docker run -d --name convert-minecraft-java-texture-to-bedrock-webapp ModifiedCommand/convert-minecraft-java-texture-to-bedrock-webapp
8+
docker run -d --name convert-minecraft-java-texture-to-bedrock-webapp modifiedcommand/convert-minecraft-java-texture-to-bedrock-webapp
99

1010
docker cp convert-minecraft-java-texture-to-bedrock-webapp:/usr/local/apache2/htdocs/ ./
1111

‎webpack.config.js‎

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const {CleanWebpackPlugin} = require("clean-webpack-plugin");
1+
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
22
const FaviconsWebpackPlugin = require("favicons-webpack-plugin");
33
const HtmlWebpackPlugin = require("html-webpack-plugin");
44
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
@@ -7,36 +7,31 @@ const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin");
77
const PACKAGE = require("./package");
88
const TerserJSPlugin = require("terser-webpack-plugin");
99

10-
const isDebug = (process.env.NODE_ENV === "development");
10+
//const isDebug = (process.env.NODE_ENV === "development");
11+
const isDebug = "production";
1112

1213
module.exports = {
14+
devtool: false,
1315
stats: {
14-
entrypoints: false,
15-
children: false
16+
children: false
1617
},
17-
devtool: false,
1818
entry: {
1919
index: "./src/js/index.mjs"
2020
},
2121
mode: (isDebug ? "development" : "production"),
2222
module: {
23-
rules: [
24-
{
23+
rules: [{
2524
test: /\.less$/,
2625
use: [MiniCssExtractPlugin.loader, "css-loader", "less-loader"]
2726
},
2827
{
29-
test: /\.worker\.js$/,
30-
use: {
31-
loader: 'worker-loader',
32-
options: {
33-
name: "[name].[contenthash].js",
34-
inline: true,
35-
fallback: false,
36-
}
37-
},
38-
}
39-
]
28+
test: /worker\.js$/,
29+
loader: "worker-loader",
30+
options: {
31+
name: "[name].[contenthash].js"
32+
}
33+
}
34+
]
4035
},
4136
optimization: {
4237
minimizer: (isDebug ? [] : [new TerserJSPlugin({}), new OptimizeCSSAssetsPlugin()]),
@@ -113,4 +108,4 @@ module.exports = {
113108
})] : [])
114109
],
115110
target: "web"
116-
};
111+
};

0 commit comments

Comments
 (0)