Skip to content

Commit c6e8a0f

Browse files
committed
Fixup boilerplate
This ensures that the server is targeting v18. Switched from yarn/pnpm to npm. It adds an editorconfig to [help] ensure that files do not get mixed indentation (and fixed mixed indentations). Removes IDE specific config files. Updated legacy project names. Ran prettier.
1 parent 8e3e677 commit c6e8a0f

35 files changed

Lines changed: 1013 additions & 1145 deletions

.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# https://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
end_of_line = lf
7+
insert_final_newline = true
8+
indent_style = tab
9+
indent_size = 4
10+
11+
[*.bat]
12+
end_of_line = crlf
13+
14+
[*.{yml,yaml}]
15+
indent_style = space
16+
indent_size = 2

.github/workflows/build-server.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,15 @@ on:
1111
jobs:
1212
build:
1313
runs-on: ubuntu-latest
14-
strategy:
15-
matrix:
16-
version: ["lts/*", "latest"]
1714
steps:
1815
- uses: actions/checkout@v3
19-
- name: Use latest Node.js LTS
20-
uses: actions/setup-node@v3
16+
- name: Using nodejs v18
17+
uses: actions/setup-node@v6
2118
with:
22-
node-version: ${{ matrix.version }}
23-
# cache: "yarn"
24-
- run: yarn
19+
node-version: "18"
20+
- run: npm install
2521
working-directory: ./server
26-
- run: yarn build
22+
- run: npm run build
2723
working-directory: ./server
28-
- run: yarn test
24+
- run: npm run test
2925
working-directory: ./server

.run/Fabric Client.run.xml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ COPY ./server/package.json /usr/src/app/package.json
88

99
FROM base AS build
1010

11-
COPY ./server/yarn.lock /usr/src/app/yarn.lock
12-
RUN yarn
11+
COPY ./server/package-lock.json /usr/src/app/package-lock.json
12+
RUN npm install
1313

1414
# copy source as late as possible, to reuse docker cache with node_modules
1515
COPY ./server /usr/src/app
16-
RUN yarn build
16+
RUN npm run build
1717

1818
FROM build AS test
19-
RUN yarn test
19+
RUN npm run test
2020

2121
# final image only includes minimal files
2222
FROM base AS deploy
@@ -33,4 +33,4 @@ ENV MAPSYNC_DATA_DIR=/data
3333

3434
EXPOSE 12312/tcp
3535

36-
CMD [ "yarn", "start" ]
36+
CMD [ "npm", "start" ]

mod/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// See Gradle's releases here: https://gradle.org/releases/
33

44
plugins {
5-
id "architectury-plugin" version "3.4-SNAPSHOT"
5+
id "architectury-plugin" version "3.4-SNAPSHOT"
66
id "dev.architectury.loom" version "1.13-SNAPSHOT" apply false
77
}
88

@@ -48,7 +48,7 @@ allprojects {
4848
includeGroup "maven.modrinth"
4949
}
5050
}
51-
maven { url = "https://pkgs.dev.azure.com/djtheredstoner/DevAuth/_packaging/public/maven/v1" }
51+
maven { url = "https://pkgs.dev.azure.com/djtheredstoner/DevAuth/_packaging/public/maven/v1" }
5252
}
5353

5454
tasks.withType(JavaCompile) {

mod/common/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ dependencies {
1313
// Do NOT use other classes from fabric loader
1414
modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"
1515

16-
// https://modrinth.com/mod/voxelmap-updated/version/1.21.11-1.15.13
17-
modCompileOnly("maven.modrinth:voxelmap-updated:tRdGJKGE")
18-
// https://modrinth.com/mod/journeymap/version/1.21.11-6.0.0-beta.56+fabric
19-
modCompileOnly("maven.modrinth:journeymap:OSpjUIEM")
20-
// https://modrinth.com/mod/xaeros-world-map/version/fabric-1.21.11-1.40.11
21-
modCompileOnly("maven.modrinth:xaeros-world-map:CkZVhVE0")
16+
// https://modrinth.com/mod/voxelmap-updated/version/1.21.11-1.15.13
17+
modCompileOnly("maven.modrinth:voxelmap-updated:tRdGJKGE")
18+
// https://modrinth.com/mod/journeymap/version/1.21.11-6.0.0-beta.56+fabric
19+
modCompileOnly("maven.modrinth:journeymap:OSpjUIEM")
20+
// https://modrinth.com/mod/xaeros-world-map/version/fabric-1.21.11-1.40.11
21+
modCompileOnly("maven.modrinth:xaeros-world-map:CkZVhVE0")
2222
}
2323

2424
tasks {

mod/common/src/main/java/gjum/minecraft/mapsync/common/MapSyncMod.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,16 @@ public static MapSyncMod getMod() {
3838
return INSTANCE;
3939
}
4040

41-
public static final String MOD_ID = "mapsync";
41+
public static final String MOD_ID = "mapsync";
4242

43-
public static final Identifier CATEGORY_ID = Identifier.fromNamespaceAndPath(MOD_ID, "general");
44-
public static final KeyMapping.Category CATEGORY = KeyMapping.Category.register(CATEGORY_ID);
43+
public static final Identifier CATEGORY_ID = Identifier.fromNamespaceAndPath(MOD_ID, "general");
44+
public static final KeyMapping.Category CATEGORY = KeyMapping.Category.register(CATEGORY_ID);
4545

4646
private static final KeyMapping openGuiKey = new KeyMapping(
4747
"key.map-sync.openGui",
4848
InputConstants.Type.KEYSYM,
4949
GLFW.GLFW_KEY_COMMA,
50-
CATEGORY
50+
CATEGORY
5151
//"category.map-sync"
5252
);
5353

mod/common/src/main/java/gjum/minecraft/mapsync/common/ModGui.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ protected void init() {
4848
right = width / 2 + innerWidth / 2;
4949
top = height / 3;
5050

51-
centerX = width / 2;
52-
centerY = width / 2;
51+
centerX = width / 2;
52+
centerY = width / 2;
5353

54-
int buttonWidth = 100;
55-
int buttonHeight = 20;
54+
int buttonWidth = 100;
55+
int buttonHeight = 20;
5656

5757
clearWidgets();
5858

mod/common/src/main/java/gjum/minecraft/mapsync/common/RenderQueue.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ private void renderLoop() {
5858

5959
if (!JourneyMapHelper.isJourneyMapNotAvailable && !JourneyMapHelper.isMapping()
6060
|| !VoxelMapHelper.isVoxelMapNotAvailable && !VoxelMapHelper.isMapping()
61-
|| !XaerosWorldMapHelper.isXaerosWorldMapNotAvailable && !XaerosWorldMapHelper.isMapping()
61+
|| !XaerosWorldMapHelper.isXaerosWorldMapNotAvailable && !XaerosWorldMapHelper.isMapping()
6262
) {
6363
debugLog("render is waiting til map mod is ready");
6464
Thread.sleep(1000);
@@ -80,7 +80,7 @@ private void renderLoop() {
8080
} else {
8181
boolean voxelRendered = VoxelMapHelper.updateWithChunkTile(chunkTile);
8282
boolean renderedJM = JourneyMapHelper.updateWithChunkTile(chunkTile);
83-
boolean xaeroRendered = XaerosWorldMapHelper.updateWithChunkTile(chunkTile);
83+
boolean xaeroRendered = XaerosWorldMapHelper.updateWithChunkTile(chunkTile);
8484

8585
debugLog("rendered? " + (voxelRendered||renderedJM|| xaeroRendered) + " " + chunkTile.chunkPos() + " queue=" + queue.size());
8686

0 commit comments

Comments
 (0)