Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ariscript committed Nov 23, 2021
2 parents 01961b4 + 7a088c9 commit db30ca6
Show file tree
Hide file tree
Showing 17 changed files with 482 additions and 75 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
"plugin:import/electron",
"plugin:import/typescript"
],
"parser": "@typescript-eslint/parser"
"parser": "@typescript-eslint/parser",
"ignorePatterns": "/*.js"
}
6 changes: 6 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"printWidth": 80,
"tabWidth": 4,
"useTabs": false,
"semi": true
}
34 changes: 17 additions & 17 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Electron Main",
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron-forge-vscode-nix",
"windows": {
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron-forge-vscode-win.cmd"
},
"runtimeArgs": [],
"cwd": "${workspaceFolder}"
}
]
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Electron Main",
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron-forge-vscode-nix",
"windows": {
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron-forge-vscode-win.cmd"
},
"runtimeArgs": [],
"cwd": "${workspaceFolder}"
}
]
}
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# multiserver
Basically MultiMC but for servers instead.
![MultiServer](assets/banner.jpg)

> The most pragmatic and efficient way to orchestrate multiple Minecraft servers.
Binary file added assets/banner.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 8 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,17 @@
"config": {}
},
{
"name": "@electron-forge/maker-rpm",
"config": {}
"html": "./src/index.html",
"js": "./src/renderer.ts",
"name": "main_window"
}
],
"plugins": [
[
"@electron-forge/plugin-webpack",
{
"devContentSecurityPolicy": "default-src 'self' 'unsafe-inline' https://serverjars.com https://launchermeta.mojang.com data:; script-src 'self' 'unsafe-eval' 'unsafe-inline' data:",
"mainConfig": "./webpack.main.config.js",
"devContentSecurityPolicy": "default-src 'self' 'unsafe-inline' https://serverjars.com https://launchermeta.mojang.com data:; script-src 'self' 'unsafe-eval' 'unsafe-inline' data:",
"renderer": {
"config": "./webpack.renderer.config.js",
"entryPoints": [
Expand Down Expand Up @@ -87,13 +88,17 @@
"@typescript-eslint/eslint-plugin": "^4.0.1",
"@typescript-eslint/parser": "^4.0.1",
"@vercel/webpack-asset-relocator-loader": "1.7.0",
"autoprefixer": "^10.4.0",
"css-loader": "^6.0.0",
"electron": "16.0.1",
"eslint": "^7.6.0",
"eslint-plugin-import": "^2.20.0",
"fork-ts-checker-webpack-plugin": "^6.0.1",
"node-loader": "^2.0.0",
"postcss": "^8.3.11",
"postcss-loader": "^6.2.0",
"style-loader": "^3.0.0",
"tailwindcss": "^2.2.19",
"ts-loader": "^9.2.2",
"typescript": "^4.0.2"
},
Expand Down
3 changes: 3 additions & 0 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
plugins: [require("tailwindcss"), require("autoprefixer")],
};
7 changes: 6 additions & 1 deletion src/index.css → src/app.global.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
Arial, sans-serif;
margin: auto;
max-width: 38rem;
padding: 2rem;
Expand Down
2 changes: 1 addition & 1 deletion src/windows/MainWIndow.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import ReactDOM from "react-dom";

import "../index.css";
import "../app.global.css";

const MainWindow = () => {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/windows/NewInstanceWIndow.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useEffect, useState } from "react";
import ReactDOM from "react-dom";

import "../index.css";
import "../app.global.css";

const NewInstanceWindow = () => {
const getServerTypes = async () => {
Expand Down
18 changes: 18 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
const colors = require("tailwindcss/colors");

module.exports = {
purge: [],
darkMode: false, // or 'media' or 'class'
theme: {
extend: {
colors: {
sky: colors.sky,
cyan: colors.cyan,
},
},
},
variants: {
extend: {},
},
plugins: [],
};
34 changes: 17 additions & 17 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"compilerOptions": {
"allowJs": true,
"module": "commonjs",
"skipLibCheck": true,
"esModuleInterop": true,
"noImplicitAny": true,
"sourceMap": true,
"baseUrl": ".",
"outDir": "dist",
"moduleResolution": "node",
"resolveJsonModule": true,
"jsx": "react",
"paths": {
"*": ["node_modules/*"]
}
},
"include": ["src/**/*"]
"compilerOptions": {
"allowJs": true,
"module": "commonjs",
"skipLibCheck": true,
"esModuleInterop": true,
"noImplicitAny": true,
"sourceMap": true,
"baseUrl": ".",
"outDir": "dist",
"moduleResolution": "node",
"resolveJsonModule": true,
"jsx": "react",
"paths": {
"*": ["node_modules/*"]
}
},
"include": ["src/**/*"]
}
8 changes: 4 additions & 4 deletions webpack.main.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ module.exports = {
* This is the main entry point for your application, it's the first file
* that runs in the main process.
*/
entry: './src/index.ts',
entry: "./src/index.ts",
// Put your normal webpack config below here
module: {
rules: require('./webpack.rules'),
rules: require("./webpack.rules"),
},
resolve: {
extensions: ['.js', '.ts', '.jsx', '.tsx', '.css', '.json']
extensions: [".js", ".ts", ".jsx", ".tsx", ".css", ".json"],
},
};
};
4 changes: 2 additions & 2 deletions webpack.plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ const ForkTsCheckerWebpackPlugin = require("fork-ts-checker-webpack-plugin");
const webpack = require("webpack");

module.exports = [
new ForkTsCheckerWebpackPlugin(),
new webpack.ExternalsPlugin("commonjs", ["electron"]),
new ForkTsCheckerWebpackPlugin(),
new webpack.ExternalsPlugin("commonjs", ["electron"]),
];
11 changes: 3 additions & 8 deletions webpack.renderer.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
const rules = require('./webpack.rules');
const plugins = require('./webpack.plugins');

rules.push({
test: /\.css$/,
use: [{ loader: 'style-loader' }, { loader: 'css-loader' }],
});
const rules = require("./webpack.rules");
const plugins = require("./webpack.plugins");

module.exports = {
module: {
rules,
},
plugins: plugins,
resolve: {
extensions: ['.js', '.ts', '.jsx', '.tsx', '.css']
extensions: [".js", ".ts", ".jsx", ".tsx", ".css"],
},
};
54 changes: 47 additions & 7 deletions webpack.rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,66 @@ module.exports = [
// We're specifying native_modules in the test because the asset relocator loader generates a
// "fake" .node file which is really a cjs file.
test: /native_modules\/.+\.node$/,
use: 'node-loader',
use: "node-loader",
},
{
test: /\.(m?js|node)$/,
parser: { amd: false },
use: {
loader: '@vercel/webpack-asset-relocator-loader',
loader: "@vercel/webpack-asset-relocator-loader",
options: {
outputAssetBase: 'native_modules',
outputAssetBase: "native_modules",
},
},
},
{
test: /\.tsx?$/,
exclude: /(node_modules|\.webpack)/,
use: {
loader: 'ts-loader',
loader: "ts-loader",
options: {
transpileOnly: true
}
}
transpileOnly: true,
},
},
},
{
test: /\.global\.css$/,
use: [
{
loader: "style-loader",
},
{
loader: "css-loader",
options: {
sourceMap: true,
},
},
{
loader: "postcss-loader",
options: {
postcssOptions: {
plugins: [require("tailwindcss"), require("autoprefixer")],
},
},
},
],
},
{
test: /^((?!\.global).)*\.css$/,
use: [
{
loader: "style-loader",
},
{
loader: "css-loader",
options: {
modules: {
localIdentName: "[name]__[local]__[hash:base64:5]",
},
sourceMap: true,
importLoaders: 1,
},
},
],
},
];
Loading

0 comments on commit db30ca6

Please # to comment.