Skip to content
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

Undo monorepo conversion #101

Merged
merged 13 commits into from
Feb 20, 2024
Merged

Undo monorepo conversion #101

merged 13 commits into from
Feb 20, 2024

Conversation

javagl
Copy link
Contributor

@javagl javagl commented Feb 17, 2024

This is essentially one big "CTRL+Z" for the things that have been done in #64 . The goal is to eventually have a single 3d-tiles-tools package, because there have been some open questions about establishing an organization called 3d-tiles-tools on NPM for publishing the scoped @3d-tiles-tools/... packages.

For now, the contents of the workspaces/packages are moved back into a "flat" src folder. The build infrastructure (i.e. the individual tsconfig.json and package.json files) is removed. Further details will be added here soon.

@javagl
Copy link
Contributor Author

javagl commented Feb 20, 2024

The conversion back to a "not-monorepo" is done.

The original workspaces/packages have been moved back into the top-level /src folder.


Some details:

The directory structure within this folder might look a bit unusual at the first glance: There are files like
src/base/base/Buffers.ts or
src/ktx/ktx/KtxUtility.ts
The reason for that is that the first subdirectory corresponds to the "package name", and the second subdirectory level reflects the structure within that package. Each of the first subdirectory levels contains an index.ts file, like
src/base/index.ts
that exports the "API". One reasoning behind that is that cross-package imports can be written in the form
import { BinaryBufferStructure } from "../../base";
which at least more closely resembles the
import { BinaryBufferStructure } from "@3d-tiles-tools/base";
from the packaged version. The alternative would be to descend into the respective subdirectory within the "package", as in
`import { BinaryBufferStructure } from "../../base/binary/BinaryBufferStructure";
Whether or not this really makes sense or is a good practice? I'm open for comments here...


I tested running the npm install and npm run package scripts (multiple times...).
I've tried out using the resulting package as...

  • a basis for installing an running the tools as a command line application
  • a dependency in a CommonJS JavaScript project
  • a dependency in a ESM JavaScript project
  • a dependency in a CommonJS TypeScript project
  • a dependency in a ESM TypeScript project
  • a dependency for the 3d-tiles-validator.... which actually required zero code changes.

I also ran all demos, and did a short review/cleanup pass of the README and IMPLEMENTATION, and have been ballsy enough to already put a release date into the CHANGES.md. Let's see how this goes...

@javagl javagl marked this pull request as ready for review February 20, 2024 15:53
@lilleyse lilleyse merged commit c1645ad into main Feb 20, 2024
2 checks passed
@lilleyse lilleyse deleted the undo-monorepo-conversion branch February 20, 2024 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants