chore(v2): refactor scripts + add theme-classic watchmode (#2998)

This commit is contained in:
Sébastien Lorber 2020-07-01 18:30:44 +02:00 committed by GitHub
parent cf5babd5c1
commit 9265de982b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 17 additions and 16 deletions

View file

@ -7,18 +7,18 @@
"packages/docusaurus-init/templates/*" "packages/docusaurus-init/templates/*"
], ],
"scripts": { "scripts": {
"start": "yarn tsc && yarn start:v2", "start": "yarn build:packages && yarn start:v2",
"start:v1": "yarn workspace docusaurus-1-website start", "start:v1": "yarn workspace docusaurus-1-website start",
"start:v2": "yarn workspace docusaurus-2-website start", "start:v2": "yarn workspace docusaurus-2-website start",
"start:v2:watch": "nodemon --watch \"./packages/*/lib/**/*.*\" --exec \"yarn start:v2\"", "start:v2:watch": "nodemon --watch \"./packages/*/lib/**/*.*\" --exec \"yarn start:v2\"",
"build": "yarn tsc && yarn build:v2", "build": "yarn build:packages && yarn build:v2",
"build:packages": "lerna run build --no-private",
"build:v1": "yarn workspace docusaurus-1-website build", "build:v1": "yarn workspace docusaurus-1-website build",
"build:v2": "yarn workspace docusaurus-2-website build", "build:v2": "yarn workspace docusaurus-2-website build",
"serve": "yarn serve:v2",
"serve:v1": "serve website-1.x/build/docusaurus", "serve:v1": "serve website-1.x/build/docusaurus",
"serve:v2": "serve website/build", "serve:v2": "serve website/build",
"changelog": "lerna-changelog", "changelog": "lerna-changelog",
"postinstall": "yarn tsc", "postinstall": "yarn build:packages",
"prettier": "prettier --config .prettierrc --write \"**/*.{js,ts}\"", "prettier": "prettier --config .prettierrc --write \"**/*.{js,ts}\"",
"prettier:diff": "prettier --config .prettierrc --list-different \"**/*.{js,ts}\"", "prettier:diff": "prettier --config .prettierrc --list-different \"**/*.{js,ts}\"",
"prettier-docs": "prettier --config .prettierrc --write \"**/*.md\"", "prettier-docs": "prettier --config .prettierrc --write \"**/*.md\"",
@ -28,7 +28,7 @@
"lerna": "lerna", "lerna": "lerna",
"test": "jest", "test": "jest",
"test:build:v2": "./admin/scripts/test-release.sh", "test:build:v2": "./admin/scripts/test-release.sh",
"tsc": "lerna run tsc --no-private", "tsc": "yarn build:packages && echo '\n\nDOCUSAURUS: yarn tsc is deprecated and will be removed, use yarn build:packages instead\n\n'",
"watch": "yarn lerna run --parallel --no-private watch", "watch": "yarn lerna run --parallel --no-private watch",
"clear": "yarn rimraf website/.docusaurus && rimraf -rf website/node_modules/.cache && yarn lerna exec 'yarn rimraf lib' --ignore docusaurus" "clear": "yarn rimraf website/.docusaurus && rimraf -rf website/node_modules/.cache && yarn lerna exec 'yarn rimraf lib' --ignore docusaurus"
}, },

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -8,7 +8,8 @@
}, },
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"tsc": "tsc --noEmit && yarn babel && yarn prettier", "build": "tsc --noEmit && yarn babel && yarn prettier",
"watch": "yarn babel --watch",
"babel": "babel src -d lib --extensions \".tsx,.ts\" --copy-files", "babel": "babel src -d lib --extensions \".tsx,.ts\" --copy-files",
"prettier": "prettier --config ../../.prettierrc --write \"**/*.{js,ts}\"" "prettier": "prettier --config ../../.prettierrc --write \"**/*.{js,ts}\""
}, },

View file

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

View file

@ -23,7 +23,7 @@
"docusaurus": "bin/docusaurus.js" "docusaurus": "bin/docusaurus.js"
}, },
"scripts": { "scripts": {
"tsc": "tsc && tsc -p tsconfig.client.json && node copyUntypedFiles.js", "build": "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\"" "watch": "node copyUntypedFiles.js && concurrently -n \"server,client\" --kill-others \"tsc --watch\" \"tsc -p tsconfig.client.json --watch\""
}, },
"bugs": { "bugs": {