Skip to content

Commit

Permalink
refactor: clean up dependencies (facebook#6470)
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-Cena authored Jan 26, 2022
1 parent f0b08f4 commit 83fb3a8
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 220 deletions.
8 changes: 0 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,23 +64,16 @@
"@babel/plugin-transform-modules-commonjs": "^7.16.0",
"@babel/preset-typescript": "^7.16.0",
"@crowdin/cli": "^3.7.1",
"@types/cssnano": "^4.0.0",
"@types/express": "^4.17.2",
"@types/fs-extra": "^9.0.6",
"@types/jest": "^26.0.20",
"@types/lodash": "^4.14.168",
"@types/node": "^17.0.8",
"@types/prismjs": "^1.16.2",
"@types/prompts": "^2.0.9",
"@types/react": "^17.0.2",
"@types/react-dev-utils": "^9.0.1",
"@types/react-helmet": "^6.0.0",
"@types/react-router-config": "^5.0.1",
"@types/react-test-renderer": "^17.0.1",
"@types/semver": "^7.1.0",
"@types/shelljs": "^0.8.6",
"@types/stylelint": "^13.13.3",
"@types/wait-on": "^5.2.0",
"@typescript-eslint/eslint-plugin": "^5.8.1",
"@typescript-eslint/parser": "^5.8.1",
"concurrently": "^7.0.0",
Expand Down Expand Up @@ -109,7 +102,6 @@
"react-dom": "^17.0.1",
"react-test-renderer": "^17.0.2",
"rimraf": "^3.0.2",
"serve": "^12.0.1",
"sharp": "^0.29.1",
"stylelint": "^14.2.0",
"stylelint-config-prettier": "^9.0.3",
Expand Down
4 changes: 4 additions & 0 deletions packages/docusaurus-plugin-debug/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ export default function pluginDebug({
return path.resolve(__dirname, '../lib/theme');
},

getTypeScriptThemePath() {
return path.resolve(__dirname, '../src/theme');
},

async contentLoaded({actions: {createData, addRoute}, allContent}) {
const allContentPath = await createData(
// Note that this created data path must be in sync with
Expand Down
5 changes: 2 additions & 3 deletions packages/docusaurus-theme-classic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
"watch": "concurrently --names \"lib,lib-next,tsc\" --kill-others \"yarn babel:lib --watch\" \"yarn babel:lib-next --watch\" \"yarn tsc --watch\"",
"babel:lib": "cross-env BABEL_ENV=lib babel src -d lib --extensions \".tsx,.ts\" --ignore \"**/*.d.ts\" --copy-files",
"babel:lib-next": "cross-env BABEL_ENV=lib-next babel src -d lib-next --extensions \".tsx,.ts\" --ignore \"**/*.d.ts\" --copy-files",
"format": "prettier --config ../../.prettierrc --ignore-path ../../.prettierignore --write \"**/*.{js,ts,jsx,tsc}\"",
"format:lib-next": "prettier --config ../../.prettierrc --write \"lib-next/**/*.{js,ts,jsx,tsc}\"",
"update-code-translations": "node -e 'require(\"./update-code-translations.js\").run()'"
"format:lib-next": "prettier --config ../../.prettierrc --write \"lib-next/**/*.{js,ts,jsx,tsc}\""
},
"dependencies": {
"@docusaurus/core": "2.0.0-beta.14",
Expand All @@ -47,6 +45,7 @@
"@docusaurus/types": "2.0.0-beta.14",
"@types/mdx-js__react": "^1.5.4",
"@types/parse-numeric-range": "^0.0.1",
"@types/prismjs": "^1.16.2",
"@types/rtlcss": "^3.1.1",
"fs-extra": "^10.0.0",
"react-test-renderer": "^17.0.2",
Expand Down
14 changes: 2 additions & 12 deletions packages/docusaurus-theme-classic/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,22 +110,12 @@ export default function docusaurusThemeClassic(
return {
name: 'docusaurus-theme-classic',

/*
Does not seem needed: webpack can already hot reload theme files
getPathsToWatch() {
return [
path.join(__dirname, '..', 'lib'),
path.join(__dirname, '..', 'lib-next'),
];
},
*/

getThemePath() {
return path.join(__dirname, '..', 'lib-next', 'theme');
return path.join(__dirname, '../lib-next/theme');
},

getTypeScriptThemePath() {
return path.resolve(__dirname, '..', 'src', 'theme');
return path.resolve(__dirname, '../src/theme');
},

getTranslationFiles: async () => getTranslationFiles({themeConfig}),
Expand Down
5 changes: 4 additions & 1 deletion packages/docusaurus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
"webpack-bundle-analyzer": "^4.4.2",
"webpack-dev-server": "^4.7.1",
"webpack-merge": "^5.8.0",
"webpackbar": "^5.0.0-3"
"webpackbar": "^5.0.2"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "2.0.0-beta.14",
Expand All @@ -112,8 +112,11 @@
"@types/mini-css-extract-plugin": "^1.4.3",
"@types/nprogress": "^0.2.0",
"@types/react-dom": "^17.0.9",
"@types/react-helmet": "^6.0.0",
"@types/react-router-config": "^5.0.1",
"@types/rtl-detect": "^1.0.0",
"@types/serve-handler": "^6.1.1",
"@types/wait-on": "^5.2.0",
"@types/webpack-bundle-analyzer": "^4.4.1",
"react-test-renderer": "^17.0.2",
"tmp-promise": "^3.0.2"
Expand Down
3 changes: 3 additions & 0 deletions packages/stylelint-copyright/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@
},
"dependencies": {
"stylelint": "^13.2.1"
},
"devDependencies": {
"@types/stylelint": "^13.13.3"
}
}
6 changes: 2 additions & 4 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,8 @@
"clsx": "^1.1.1",
"color": "^4.0.1",
"esbuild-loader": "2.16.0",
"hast-util-is-element": "1.1.0",
"netlify-plugin-cache": "^1.0.3",
"npm-to-yarn": "^1.0.0-2",
"raw-loader": "^4.0.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-medium-image-zoom": "^4.3.5",
Expand All @@ -74,7 +73,6 @@
"@tsconfig/docusaurus": "^1.0.4",
"@types/jest": "^26.0.20",
"cross-env": "^7.0.3",
"fs-extra": "^10.0.0",
"raw-loader": "^4.0.2"
"fs-extra": "^10.0.0"
}
}
Loading

0 comments on commit 83fb3a8

Please sign in to comment.