misc(v2): better dx: yarn clear, yarn watch, yarn serve (#2922)

* add clear + serve scripts

* add ability to launch all TS projects in --watch mode

* attempt to create a watch plugin

* use rimraf for clear script

* update watch plugin poc

* add start:v2:watch

* remove the watch plugin
This commit is contained in:
Sébastien Lorber 2020-06-16 14:40:46 +02:00 committed by GitHub
parent c1102a4eae
commit b5d7c3a111
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 605 additions and 28 deletions

View file

@ -10,7 +10,8 @@
"url": "https://github.com/facebook/docusaurus/issues"
},
"scripts": {
"tsc": "tsc"
"tsc": "tsc",
"watch": "tsc --watch"
},
"bin": {
"docusaurus-init": "bin/index.js"

View file

@ -4,7 +4,8 @@
"description": "Client redirects plugin for Docusaurus",
"main": "lib/index.js",
"scripts": {
"tsc": "tsc"
"tsc": "tsc",
"watch": "tsc --watch"
},
"publishConfig": {
"access": "public"

View file

@ -4,7 +4,8 @@
"description": "Blog plugin for Docusaurus",
"main": "lib/index.js",
"scripts": {
"tsc": "tsc"
"tsc": "tsc",
"watch": "tsc --watch"
},
"publishConfig": {
"access": "public"

View file

@ -4,7 +4,8 @@
"description": "Docs content plugin for Docusaurus",
"main": "lib/index.js",
"scripts": {
"tsc": "tsc"
"tsc": "tsc",
"watch": "tsc --watch"
},
"publishConfig": {
"access": "public"

View file

@ -4,7 +4,8 @@
"description": "Pages content plugin for Docusaurus",
"main": "lib/index.js",
"scripts": {
"tsc": "tsc"
"tsc": "tsc",
"watch": "tsc --watch"
},
"publishConfig": {
"access": "public"

View file

@ -4,7 +4,8 @@
"description": "Docusaurus Plugin to generate an almost ideal image (responsive, lazy-loading, and low quality placeholder)",
"main": "lib/index.js",
"scripts": {
"tsc": "tsc && node copyUntypedFiles.js"
"tsc": "tsc && node copyUntypedFiles.js",
"watch": "node copyUntypedFiles.js && tsc --watch"
},
"publishConfig": {
"access": "public"

View file

@ -4,7 +4,8 @@
"description": "Simple sitemap generation plugin for Docusaurus",
"main": "lib/index.js",
"scripts": {
"tsc": "tsc"
"tsc": "tsc",
"watch": "tsc --watch"
},
"publishConfig": {
"access": "public"

View file

@ -5,7 +5,8 @@
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
"scripts": {
"tsc": "tsc"
"tsc": "tsc",
"watch": "tsc --watch"
},
"publishConfig": {
"access": "public"

View file

@ -23,7 +23,8 @@
"docusaurus": "bin/docusaurus.js"
},
"scripts": {
"tsc": "tsc && tsc -p tsconfig.client.json && node copyUntypedFiles.js"
"tsc": "tsc && tsc -p tsconfig.client.json && node copyUntypedFiles.js",
"watch": "node copyUntypedFiles.js && concurrently -n \"server,client\" --kill-others \"tsc --watch\" \"tsc -p tsconfig.client.json --watch\""
},
"bugs": {
"url": "https://github.com/facebook/docusaurus/issues"