From 6f2613cc5c9a69ba7fa1ffc09a281836ed0ad017 Mon Sep 17 00:00:00 2001 From: bjoluc Date: Sat, 11 Dec 2021 23:28:07 +0100 Subject: [PATCH] Setup turborepo --- .gitignore | 1 + package-lock.json | 43 ++++++++++++++++++++++++++++++++--- package.json | 23 ++++++++++++++++--- packages/config/package.json | 4 ---- packages/jspsych/package.json | 1 - 5 files changed, 61 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 0e63172d..b9e6aaaf 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ coverage/ .vscode/ dist.zip packages/jspsych/README.md +.turbo diff --git a/package-lock.json b/package-lock.json index 2bd14bfd..cae3a54a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,8 @@ "import-sort-style-module": "^6.0.0", "lint-staged": "^11.1.2", "prettier": "^2.3.2", - "prettier-plugin-import-sort": "^0.0.7" + "prettier-plugin-import-sort": "^0.0.7", + "turbo": "^1.0.6" }, "engines": { "node": ">=14.0.0", @@ -14763,6 +14764,19 @@ "node": ">=8" } }, + "node_modules/turbo": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/turbo/-/turbo-1.0.6.tgz", + "integrity": "sha512-sAbPHCm8usX3a27WHfWmAqt+wHxk/5Z6tqLqqI1MIzFoSEtmLZWyXOTxpi+60fwfwivOdW97cTsrZbkezVhGyw==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "zlib": "^1.0.5" + }, + "bin": { + "turbo": "bin/turbo" + } + }, "node_modules/type": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", @@ -15817,6 +15831,16 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/zlib": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/zlib/-/zlib-1.0.5.tgz", + "integrity": "sha1-bnyXL8NxxkWmr7A6sUdp3vEU/MA=", + "dev": true, + "hasInstallScript": true, + "engines": { + "node": ">=0.2.0" + } + }, "packages/config": { "name": "@jspsych/config", "version": "1.1.0", @@ -15947,7 +15971,6 @@ }, "devDependencies": { "@jspsych/config": "^1.1.0", - "@jspsych/test-utils": "^1.1.1", "@types/dom-mediacapture-record": "^1.0.11" } }, @@ -24542,7 +24565,6 @@ "version": "file:packages/jspsych", "requires": { "@jspsych/config": "^1.1.0", - "@jspsych/test-utils": "^1.1.1", "@types/dom-mediacapture-record": "^1.0.11", "auto-bind": "^4.0.0", "random-words": "^1.1.1" @@ -28158,6 +28180,15 @@ } } }, + "turbo": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/turbo/-/turbo-1.0.6.tgz", + "integrity": "sha512-sAbPHCm8usX3a27WHfWmAqt+wHxk/5Z6tqLqqI1MIzFoSEtmLZWyXOTxpi+60fwfwivOdW97cTsrZbkezVhGyw==", + "dev": true, + "requires": { + "zlib": "^1.0.5" + } + }, "type": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", @@ -28995,6 +29026,12 @@ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true + }, + "zlib": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/zlib/-/zlib-1.0.5.tgz", + "integrity": "sha1-bnyXL8NxxkWmr7A6sUdp3vEU/MA=", + "dev": true } } } diff --git a/package.json b/package.json index b019f0d5..710a2d66 100644 --- a/package.json +++ b/package.json @@ -7,10 +7,10 @@ "scripts": { "test": "jest", "test:watch": "npm test -- --watch", - "build": "npm run build -w jspsych && npm run build -ws", + "build": "turbo run build", "build:archive": "gulp createCoreDistArchive", "prepare": "husky install && npm run build", - "tsc": "npm run tsc -ws", + "tsc": "turbo tsc", "changeset": "changeset", "release": "changeset publish" }, @@ -25,7 +25,8 @@ "import-sort-style-module": "^6.0.0", "lint-staged": "^11.1.2", "prettier": "^2.3.2", - "prettier-plugin-import-sort": "^0.0.7" + "prettier-plugin-import-sort": "^0.0.7", + "turbo": "^1.0.6" }, "prettier": { "printWidth": 100 @@ -43,5 +44,21 @@ "projects": [ "/packages/*/jest.config.cjs" ] + }, + "turbo": { + "baseBranch": "origin/main", + "pipeline": { + "build": { + "dependsOn": [ + "^build" + ], + "outputs": [ + "dist/**" + ] + }, + "tsc": { + "outputs": [] + } + } } } diff --git a/packages/config/package.json b/packages/config/package.json index 9a80a738..dfe04096 100644 --- a/packages/config/package.json +++ b/packages/config/package.json @@ -27,10 +27,6 @@ "engines": { "node": ">=14.0.0" }, - "scripts": { - "build": "", - "tsc": "" - }, "repository": { "type": "git", "url": "git+https://github.com/jspsych/jsPsych.git", diff --git a/packages/jspsych/package.json b/packages/jspsych/package.json index da819d2b..7ea3adf5 100644 --- a/packages/jspsych/package.json +++ b/packages/jspsych/package.json @@ -44,7 +44,6 @@ }, "devDependencies": { "@jspsych/config": "^1.1.0", - "@jspsych/test-utils": "^1.1.1", "@types/dom-mediacapture-record": "^1.0.11" } }