-
Notifications
You must be signed in to change notification settings - Fork 221
Commit
This PR splits the repository into five node packages that are also yarn workspaces: - php-cli - php-wasm - typescript-reference-doc-generator - wordpress-playground - wordpress-plugin-ide This effectively undoes [Use folders instead of separate npm packages](#70), so you may ask "why bother?" With this PR: * The build process is straightforward. There's no `gulp` and there's no mountain of custom logic in `esbuild.js`. Files are moved around the repo using a simple `copy` plugin or an `import` statement. There's no custom cache busting logic – it's handled by the build tools instead * `php-wasm` is now reusable and can be published in npm. This means it can be easily reused outside of WordPress Playground. * Each package has its own build process that caters to its specific needs. For example, `php-cli` outputs a node.js script. Web workers can now be bundled as `iife` (which is the only way to use them in firefox) while other assets are es modules. * There are less tasks in general. For example, TypeScript types are handled by rollup in a few packages. At the same time, none of the [original downsides of using packages ](#70) are present: * There's no global build pipeline. Every package outputs a complete build artifact that can be directly imported in case of libs, or used in the browser in case of the Playground website. * Yarn workspaces ensure the tasks are executed in the correct order * tsconfig.json and package.json can mostly be copied, there's no `api-documenter.json` at all.
- Loading branch information
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
nodeLinker: node-modules | ||
|
||
plugins: | ||
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs | ||
spec: "@yarnpkg/plugin-workspace-tools" | ||
|
||
yarnPath: .yarn/releases/yarn-3.4.1.cjs |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
|
||
node packages/typescript-reference-doc-generator/build/tsdoc-to-api-markdown.js \ | ||
-e packages/php-wasm/build/web/types/index.d.ts \ | ||
packages/wordpress-plugin-ide/build/types/index.d.ts \ | ||
-o docs/api |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.