Simplified the deployment script

* Implemented yarn run deploy, which deploys all packages to npm, with the same version assigned to all of them.
This commit is contained in:
Aria Minaei 2021-08-04 21:51:25 +02:00
parent 4395c62b17
commit c2b5dca63b
11 changed files with 152 additions and 24 deletions

View file

@ -1,6 +1,6 @@
{
"name": "@theatre/core",
"version": "0.4.0-dev.3",
"version": "0.4.0-dev.4",
"license": "Apache-2.0",
"description": "Motion design editor for the web",
"repository": {
@ -36,7 +36,7 @@
"dist/index.d.ts"
],
"scripts": {
"prepublish": "cd .. && yarn run ensure-publishing"
"prepublish": "node ../../devEnv/ensurePublishing.js"
},
"sideEffects": true,
"dependencies": {

View file

@ -1,5 +0,0 @@
if (process.env.THEATRE_IS_PUBLISHING !== 'true') {
throw Error(
`This script may run only when the "deploy" command in root/theatre is running.`,
)
}

View file

@ -1,7 +1,7 @@
{
"name": "theatre",
"private": true,
"version": "0.4.0-dev.3",
"version": "0.4.0-dev.4",
"workspaces": [
"./shared",
"./core",
@ -13,13 +13,7 @@
"build:js:watch": "node -r esbuild-register devEnv/watch.ts",
"build:dts": "run-s typecheck build:dts:bundle",
"build:dts:bundle": "rollup -c devEnv/declarations-bundler/rollup.config.js",
"build": "run-p build:dts build:js",
"deploy": "cross-env-shell THEATRE_IS_PUBLISHING=true \"yarn run _deploy:steps\"",
"_deploy:steps": "run-s ensure-publishing update-versions build _deploy:core _deploy:studio",
"_deploy:core": "yarn workspace @theatre/core npm publish --access public",
"_deploy:studio": "yarn workspace @theatre/studio npm publish --access public",
"ensure-publishing": "node ./devEnv/ensurePublishing.js",
"update-versions": "node -r esbuild-register devEnv/updateVersions.ts"
"build": "run-p build:dts build:js"
},
"devDependencies": {
"@babel/cli": "^7.14.3",

View file

@ -1,6 +1,6 @@
{
"name": "@theatre/studio",
"version": "0.4.0-dev.3",
"version": "0.4.0-dev.4",
"license": "AGPL-3.0-only",
"description": "Motion design editor for the web",
"repository": {
@ -36,7 +36,7 @@
"dist/index.d.ts"
],
"scripts": {
"prepublish": "cd .. && yarn run ensure-publishing"
"prepublish": "node ../../devEnv/ensurePublishing.js"
},
"sideEffects": true,
"peerDependencies": {