fix(module-type-aliases): move @type packages to dependencies (#5601)

* Move devDeps to deps

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Update docs

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>

* Update init template

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
This commit is contained in:
Joshua Chen 2021-09-22 20:49:25 +08:00 committed by GitHub
parent 02822b8a42
commit e1f4677d04
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 20 deletions

View file

@ -29,9 +29,6 @@
"devDependencies": {
"@docusaurus/module-type-aliases": "2.0.0-beta.6",
"@tsconfig/docusaurus": "^1.0.4",
"@types/react": "^17.0.14",
"@types/react-helmet": "^6.1.2",
"@types/react-router-dom": "^5.1.8",
"typescript": "^4.3.5"
},
"browserslist": {

View file

@ -11,7 +11,7 @@
"url": "https://github.com/facebook/docusaurus.git",
"directory": "packages/docusaurus-module-type-aliases"
},
"devDependencies": {
"dependencies": {
"@types/react": "*",
"@types/react-helmet": "*",
"@types/react-loadable": "*",

View file

@ -2,7 +2,6 @@
"name": "@docusaurus/types",
"version": "2.0.0-beta.6",
"description": "Common types for Docusaurus packages.",
"main": "./src/index.js",
"types": "./src/index.d.ts",
"publishConfig": {
"access": "public"

View file

@ -1,10 +0,0 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/* eslint-disable */
'use strict';
Object.defineProperty(exports, '__esModule', {value: true});

View file

@ -17,10 +17,10 @@ Below are some guides on how to migrate an existing project to TypeScript.
## Setup {#setup}
To start using TypeScript, add `@docusaurus/module-type-aliases` and some `@types` dependencies to your project:
To start using TypeScript, add `@docusaurus/module-type-aliases` and the base TS config to your project:
```bash npm2yarn
npm install --save-dev typescript @docusaurus/module-type-aliases @types/react @types/react-router-dom @types/react-helmet @tsconfig/docusaurus
npm install --save-dev typescript @docusaurus/module-type-aliases @tsconfig/docusaurus
```
Then add `tsconfig.json` to your project root with the following content:

View file

@ -4357,7 +4357,7 @@
"@types/webpack" "^4"
"@types/webpack-dev-server" "*"
"@types/react-helmet@*", "@types/react-helmet@^6.0.0", "@types/react-helmet@^6.1.2":
"@types/react-helmet@*", "@types/react-helmet@^6.0.0":
version "6.1.2"
resolved "https://registry.yarnpkg.com/@types/react-helmet/-/react-helmet-6.1.2.tgz#e9d7d16b29e4ec5716711c52c35c3cec45819eac"
integrity sha512-dcfAZNlWb5JYFbO9CGfrPWLJAyFcT6UeR3u35eBbv8liY2Rg4K7fM1G5+HnwVgot+C+kVwXAZ8pLEn2jsMfTDg==
@ -4381,7 +4381,7 @@
"@types/react" "*"
"@types/react-router" "*"
"@types/react-router-dom@*", "@types/react-router-dom@^5.1.8":
"@types/react-router-dom@*":
version "5.1.8"
resolved "https://registry.yarnpkg.com/@types/react-router-dom/-/react-router-dom-5.1.8.tgz#bf3e1c8149b3d62eaa206d58599de82df0241192"
integrity sha512-03xHyncBzG0PmDmf8pf3rehtjY0NpUj7TIN46FrT5n1ZWHPZvXz32gUyNboJ+xsL8cpg8bQVLcllptcQHvocrw==
@ -4398,7 +4398,7 @@
"@types/history" "*"
"@types/react" "*"
"@types/react@*", "@types/react@^17.0.14", "@types/react@^17.0.2":
"@types/react@*", "@types/react@^17.0.2":
version "17.0.15"
resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.15.tgz#c7533dc38025677e312606502df7656a6ea626d0"
integrity sha512-uTKHDK9STXFHLaKv6IMnwp52fm0hwU+N89w/p9grdUqcFA6WuqDyPhaWopbNyE1k/VhgzmHl8pu1L4wITtmlLw==