Skip to content

Commit

Permalink
refactor: save and pkm interfaces (#56)
Browse files Browse the repository at this point in the history
* start centralizing collection of supported save types

* initial buggy centralization

* fix bugs from refacotr

* move save detection to save type classes

* use pkm interface instead of hardcoded type

* update OHPKM buffers -> uint8arrays

* fix file type select name

* a few more fixes

* gameboy save tweaks
  • Loading branch information
andrewbenington authored Nov 12, 2024
1 parent 77ddae6 commit 276f825
Show file tree
Hide file tree
Showing 79 changed files with 5,785 additions and 3,633 deletions.
15 changes: 7 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,12 @@ package:

.PHONY: start
start:
@npm run dev
@npm run dev:unix

.PHONY: preview
preview:
@npm run start

.PHONY: test
test:
@npm run test

.PHONY: lint
lint:
@npm run lint
Expand Down Expand Up @@ -65,6 +61,9 @@ sync-resources: generate/out
download-item-sprites:
@python3 generate/downloadAllItems.py

.PHONY: test-interfaces
test-interfaces:
@ts-node --project tsconfig.json src/types/pkm_old/__test__/all.test.ts
.PHONY: test
test:
@ts-node --project tsconfig.node.json src/types/SAVTypes/__test__/G1SAV.test.ts

%:
@npm run $@
3 changes: 3 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [['@babel/preset-env', { targets: { node: 'current' } }], '@babel/preset-typescript'],
}
3 changes: 0 additions & 3 deletions dev-app-update.yml

This file was deleted.

11 changes: 11 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
transform: {
'^.+\\.[tj]sx?$': [
'babel-jest',
{ presets: ['@babel/preset-env', '@babel/preset-typescript'] },
],
},
testEnvironment: 'node',
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.[tj]sx?$',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
}
Loading

0 comments on commit 276f825

Please sign in to comment.