Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: reorganize codebase as monorepo
Convert the codebase into a monorepo, using NPM's workspaces. The packages are: - The core package (@webtoon/psd) is moved under `packages/psd/` - The browser example app, benchmark app, and Node.js example app are given their own packages under `packages/`. These packages are marked private in order to prevent accidentally publishing them. - The example apps now import @webtoon/psd using NPM's workspace support (i.e. `import "@webtoon/psd"`) instead of relative paths (i.e. `import "../../src"`). This has several benefits: - Clarify which dependencies are needed for building and testing @webtoon/psd, and which ones are needed for building the examples. - Allow us to apply different configurations for the core package and example apps in a sensible way. - Force the examples to consume @webtoon/psd as though it was installed from npmjs.com. This helps us identify bundling/deployment problems, and provides better examples for users. Other changes added in this commit: - Change the bundle name to `index.js`. This fixes issue #13 properly (better than #14, which may have caused TypeScript issues for users) - The benchmark app now has its own PSD file (`example.psd`) instead of borrowing it from the Node.js example app. - The Node.js example app uses node-dev instead of tsc-watch. - We now have two README.md and LICENSE files. The ones in the root directory are for people who visit the project repo, while the ones under `packages/psd/` are included when publishing @webtoon/psd. - Properly sort import statements in some files.
- Loading branch information