Skip to content

refactor: split shared into packages #50

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

tomast1337
Copy link
Member

No description provided.

@tomast1337 tomast1337 self-assigned this Jul 25, 2025
@tomast1337 tomast1337 added enhancement New feature or request help wanted Extra attention is needed labels Jul 25, 2025
Copy link
Member

@Bentroen Bentroen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thank you for working on these changes =)

Some extra things (besides the review comments) we gotta make sure are working before merging:

  • Update VSCode workspace file, test running etc. to reflect the new project structure
  • Update GitHub Actions to reflect the new project structure

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As the app packages are now prefixed with @nbw/, it could be a good idea to rename them to just @nbw/frontend and @nbw/backend in package.json?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We had originally decided to leave build.ts in the root of the project, as it was depended upon by both the frontend and the backend. With the new project structure, doesn't it belong in one of the different packages we created?
(Adding @nbw/sounds as the one single global workspace dependency looks a bit weird to me, haha :) )

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency, could we rename the build commands to use frontend and backend too, like the package names?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a result of introducing separate packages, first-party package imports have been grouped with third-party ones (see this file as an example). The @nbw/ group should be added as a local package group in ESLint - I'll look up how we can do this again :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the backend package should belong in apps too?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following the rest of the project's structure, this file could be moved to the source file's path, and renamed to stats.spec.ts (as we'll likely add test files for the other modules in there)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To avoid all the repetition, would it be possible to use a shared tsconfig.json using extends with these common package configurations?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The separate .gitignore files may not be necessary, in case the root's package.json already takes care of them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants