theatre/scripts/publish-to-yalc.mjs
Fülöp 3d10325873
Add tests for Theatre.js + popular setups in the ecosystem (#165)
This implements some basic infra for testing Theatre.js with popular setups such as npm/yarn/pnpm, webpack/vite/parcel, js/ts, etc.

So far, the only existing setup has been with create-react-app. Will add more in the future.

Co-authored-by: Fülöp <fulopkovacs@users.noreply.github.com>
Co-authored-by: Aria Minaei <aria.minaei@gmail.com>
2022-05-17 20:53:01 +02:00

26 lines
559 B
JavaScript

/**
* Publish the theatre packages to a local registry with yalc for the ecosystem tests.
*/
import path from 'path'
const root = path.resolve(__dirname, '..')
// Make sure the script runs in the root of the monorepo
cd(root)
process.env.USING_YALC = 'true'
const packagesToPublish = [
'theatre/core',
'theatre/studio',
'packages/dataverse',
'packages/r3f',
'packages/react',
]
;(async function () {
// Publish the packages to the local `yalc` registry
for (const pkg of packagesToPublish) {
await $`npx yalc publish ${pkg}`
}
})()