mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-17 11:07:07 +02:00
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:
parent
c1102a4eae
commit
b5d7c3a111
11 changed files with 605 additions and 28 deletions
12
package.json
12
package.json
|
@ -10,9 +10,13 @@
|
|||
"start": "yarn tsc && yarn start:v2",
|
||||
"start:v1": "yarn workspace docusaurus-1-website start",
|
||||
"start:v2": "yarn workspace docusaurus-2-website start",
|
||||
"start:v2:watch": "nodemon --watch \"./packages/*/lib/**/*.*\" --exec \"yarn start:v2\"",
|
||||
"build": "yarn tsc && yarn build:v2",
|
||||
"build:v1": "yarn workspace docusaurus-1-website build",
|
||||
"build:v2": "yarn workspace docusaurus-2-website build",
|
||||
"serve": "yarn serve:v2",
|
||||
"serve:v1": "serve website-1.x/build/docusaurus",
|
||||
"serve:v2": "serve website/build",
|
||||
"changelog": "lerna-changelog",
|
||||
"postinstall": "yarn tsc",
|
||||
"prettier": "prettier --config .prettierrc --write \"**/*.{js,ts}\"",
|
||||
|
@ -22,7 +26,9 @@
|
|||
"lerna": "lerna",
|
||||
"test": "jest",
|
||||
"test:build:v2": "./admin/scripts/test-release.sh",
|
||||
"tsc": "lerna run tsc --no-private"
|
||||
"tsc": "lerna run tsc --no-private",
|
||||
"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"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.9.0",
|
||||
|
@ -52,6 +58,7 @@
|
|||
"@types/webpack-dev-server": "^3.9.0",
|
||||
"@types/webpack-merge": "^4.1.5",
|
||||
"babel-eslint": "^10.0.3",
|
||||
"concurrently": "^5.2.0",
|
||||
"enzyme": "^3.10.0",
|
||||
"enzyme-adapter-react-16": "^1.15.1",
|
||||
"eslint": "^6.7.1",
|
||||
|
@ -67,9 +74,12 @@
|
|||
"lerna": "^3.19.0",
|
||||
"lerna-changelog": "^1.0.1",
|
||||
"lint-staged": "^10.1.2",
|
||||
"nodemon": "^2.0.4",
|
||||
"prettier": "^2.0.2",
|
||||
"react": "^16.8.4",
|
||||
"react-dom": "^16.8.4",
|
||||
"rimraf": "^3.0.2",
|
||||
"serve": "^11.3.2",
|
||||
"stylelint": "^13.2.1",
|
||||
"typescript": "^3.7.2"
|
||||
},
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
"description": "Blog plugin for Docusaurus",
|
||||
"main": "lib/index.js",
|
||||
"scripts": {
|
||||
"tsc": "tsc"
|
||||
"tsc": "tsc",
|
||||
"watch": "tsc --watch"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
"main": "./lib/index.js",
|
||||
"types": "./lib/index.d.ts",
|
||||
"scripts": {
|
||||
"tsc": "tsc"
|
||||
"tsc": "tsc",
|
||||
"watch": "tsc --watch"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue