Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/pr-triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
- synchronize
jobs:
label:
permissions:
contents: read
pull-requests: write
issues: write
name: Label
if: github.event.action != 'edited'
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"Fexkoser <martin.fillon@epitech.eu>",
"Tchips <leo.outmizguine@epitech.eu>"
],
"type": "module",
"repository": {
"type": "git",
"url": "git+https://github.com/NanoForge-dev/Engine.git",
Expand Down
7 changes: 4 additions & 3 deletions packages/ecs-client/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ OBJ = $(SRC:.cpp=.o)
%.o: %.cpp
$(CC) -c $< -o $@ $(CFLAGS)

all: $(JS_NAME)
all: $(TS_NAME) $(JS_NAME) $(WASM_NAME)

$(JS_NAME): LDFLAGS += -s MODULARIZE=1 -s EXPORT_ES6=1 -s ENVIRONMENT=web
$(JS_NAME): $(OBJ)
$(TS_NAME) $(JS_NAME) $(WASM_NAME): LDFLAGS += -s MODULARIZE=1 -s EXPORT_ES6=1 -s ENVIRONMENT=web
$(TS_NAME) $(JS_NAME) $(WASM_NAME) &: $(OBJ)
@mkdir -p $(OUT_DIR)
$(CC) $(OBJ) $(LDFLAGS) -o $(JS_NAME)
cp $(BASE_DIR)/$(TS_NAME) $(TS_NAME)
Expand All @@ -40,6 +40,7 @@ tests: LDFLAGS += -s MODULARIZE=1 -s EXPORT_ES6=1
tests: $(OBJ)
@mkdir -p $(OUT_DIR)
$(CC) $(OBJ) $(LDFLAGS) -o $(JS_NAME)
cp $(BASE_DIR)/$(TS_NAME) $(TS_NAME)

re: fclean all

Expand Down
2 changes: 1 addition & 1 deletion packages/ecs-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"clean": "make fclean",
"lint": "prettier --check . && eslint --format=pretty src",
"format": "prettier --write . && eslint --fix --format=pretty src",
"test:unit": "make fclean && make tests -j 16 && vitest run --config ../../vitest.config.ts",
"test:unit": "make fclean && make tests -j 16 && vitest run --config ../../vitest.config.ts && make fclean",
"prepack": "pnpm run build && pnpm run lint",
"changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/ecs-client/*'",
"release": "cliff-jumper"
Expand Down
12 changes: 6 additions & 6 deletions packages/ecs-lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ NAME := libecs
OUT_DIR = lib
JS_NAME = $(OUT_DIR)/$(NAME).js
WASM_NAME = $(OUT_DIR)/$(NAME).wasm
TS_NAME = $(NAME).d.ts
TS_NAME = $(OUT_DIR)/$(NAME).d.ts

CFLAGS = -std=c++20
LDFLAGS = -O3 --no-entry --bind -sNO_DISABLE_EXCEPTION_CATCHING -sEXPORT_EXCEPTION_HANDLING_HELPERS
Expand All @@ -20,14 +20,14 @@ OBJ = $(SRC:.cpp=.o)
%.o: %.cpp
$(CC) -c $< -o $@ $(CFLAGS)

all: $(TS_NAME)
all: $(TS_NAME) $(JS_NAME) $(WASM_NAME)

$(TS_NAME): LDFLAGS += -s MODULARIZE=1
$(TS_NAME): $(OBJ)
$(TS_NAME) $(JS_NAME) $(WASM_NAME): LDFLAGS += -s MODULARIZE=1
$(TS_NAME) $(JS_NAME) $(WASM_NAME) &: $(OBJ)
@mkdir -p $(OUT_DIR)
$(CC) $(OBJ) $(LDFLAGS) --emit-tsd libecs-tmp.d.ts -o $(JS_NAME)
cat build/pre.ts > $(OUT_DIR)/$(TS_NAME)
cat $(OUT_DIR)/libecs-tmp.d.ts >> $(OUT_DIR)/$(TS_NAME)
cat build/pre.ts > $(TS_NAME)
cat $(OUT_DIR)/libecs-tmp.d.ts >> $(TS_NAME)
$(RM) $(OUT_DIR)/libecs-tmp.d.ts


Expand Down
7 changes: 4 additions & 3 deletions packages/ecs-server/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ OBJ = $(SRC:.cpp=.o)
%.o: %.cpp
$(CC) -c $< -o $@ $(CFLAGS)

all: $(JS_NAME)
all: $(TS_NAME) $(JS_NAME) $(WASM_NAME)

$(JS_NAME): LDFLAGS += -s MODULARIZE=1 -s EXPORT_ES6=1 -s ENVIRONMENT=node
$(JS_NAME): $(OBJ)
$(TS_NAME) $(JS_NAME) $(WASM_NAME): LDFLAGS += -s MODULARIZE=1 -s EXPORT_ES6=1 -s ENVIRONMENT=node
$(TS_NAME) $(JS_NAME) $(WASM_NAME) &: $(OBJ)
@mkdir -p $(OUT_DIR)
$(CC) $(OBJ) $(LDFLAGS) -o $(JS_NAME)
cp $(BASE_DIR)/$(TS_NAME) $(TS_NAME)
Expand All @@ -40,6 +40,7 @@ tests: LDFLAGS += -s MODULARIZE=1 -s EXPORT_ES6=1
tests: $(OBJ)
@mkdir -p $(OUT_DIR)
$(CC) $(OBJ) $(LDFLAGS) -o $(JS_NAME)
cp $(BASE_DIR)/$(TS_NAME) $(TS_NAME)

re: fclean all

Expand Down
2 changes: 1 addition & 1 deletion packages/ecs-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"clean": "make fclean",
"lint": "prettier --check . && eslint --format=pretty src",
"format": "prettier --write . && eslint --fix --format=pretty src",
"test:unit": "make fclean && make tests -j 16 && vitest run --config ../../vitest.config.ts",
"test:unit": "make fclean && make tests -j 16 && vitest run --config ../../vitest.config.ts && make fclean",
"prepack": "pnpm run build && pnpm run lint",
"changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/ecs-server/*'",
"release": "cliff-jumper"
Expand Down
Loading