create-docusaurus 2.0.1 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -325,8 +325,10 @@ async function updatePkg(pkgPath, obj) {
325
325
  await fs.outputFile(pkgPath, `${JSON.stringify(newPkg, null, 2)}\n`);
326
326
  }
327
327
  export default async function init(rootDir, reqName, reqTemplate, cliOptions = {}) {
328
- const templates = await readTemplates();
329
- const siteName = await getSiteName(reqName, rootDir);
328
+ const [templates, siteName] = await Promise.all([
329
+ readTemplates(),
330
+ getSiteName(reqName, rootDir),
331
+ ]);
330
332
  const dest = path.resolve(rootDir, siteName);
331
333
  const source = await getSource(reqTemplate, templates, cliOptions);
332
334
  logger.info('Creating new Docusaurus project...');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-docusaurus",
3
- "version": "2.0.1",
3
+ "version": "2.2.0",
4
4
  "description": "Create Docusaurus apps easily.",
5
5
  "type": "module",
6
6
  "repository": {
@@ -22,8 +22,8 @@
22
22
  },
23
23
  "license": "MIT",
24
24
  "dependencies": {
25
- "@docusaurus/logger": "2.0.1",
26
- "@docusaurus/utils": "2.0.1",
25
+ "@docusaurus/logger": "2.2.0",
26
+ "@docusaurus/utils": "2.2.0",
27
27
  "commander": "^5.1.0",
28
28
  "fs-extra": "^10.1.0",
29
29
  "lodash": "^4.17.21",
@@ -39,5 +39,5 @@
39
39
  "engines": {
40
40
  "node": ">=16.14"
41
41
  },
42
- "gitHead": "1ddee1c29cabf9bb52e4d78af6ebfaaabb1bc1f9"
42
+ "gitHead": "a308fb7c81832cca354192fe2984f52749441249"
43
43
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docusaurus-2-classic-template",
3
- "version": "2.0.1",
3
+ "version": "2.2.0",
4
4
  "private": true,
5
5
  "scripts": {
6
6
  "docusaurus": "docusaurus",
@@ -14,8 +14,8 @@
14
14
  "write-heading-ids": "docusaurus write-heading-ids"
15
15
  },
16
16
  "dependencies": {
17
- "@docusaurus/core": "2.0.1",
18
- "@docusaurus/preset-classic": "2.0.1",
17
+ "@docusaurus/core": "2.2.0",
18
+ "@docusaurus/preset-classic": "2.2.0",
19
19
  "@mdx-js/react": "^1.6.22",
20
20
  "clsx": "^1.2.1",
21
21
  "prism-react-renderer": "^1.3.5",
@@ -23,7 +23,7 @@
23
23
  "react-dom": "^17.0.2"
24
24
  },
25
25
  "devDependencies": {
26
- "@docusaurus/module-type-aliases": "2.0.1"
26
+ "@docusaurus/module-type-aliases": "2.2.0"
27
27
  },
28
28
  "browserslist": {
29
29
  "production": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docusaurus-2-classic-typescript-template",
3
- "version": "2.0.1",
3
+ "version": "2.2.0",
4
4
  "private": true,
5
5
  "scripts": {
6
6
  "docusaurus": "docusaurus",
@@ -15,8 +15,8 @@
15
15
  "typecheck": "tsc"
16
16
  },
17
17
  "dependencies": {
18
- "@docusaurus/core": "2.0.1",
19
- "@docusaurus/preset-classic": "2.0.1",
18
+ "@docusaurus/core": "2.2.0",
19
+ "@docusaurus/preset-classic": "2.2.0",
20
20
  "@mdx-js/react": "^1.6.22",
21
21
  "clsx": "^1.2.1",
22
22
  "prism-react-renderer": "^1.3.5",
@@ -24,7 +24,7 @@
24
24
  "react-dom": "^17.0.2"
25
25
  },
26
26
  "devDependencies": {
27
- "@docusaurus/module-type-aliases": "2.0.1",
27
+ "@docusaurus/module-type-aliases": "2.2.0",
28
28
  "@tsconfig/docusaurus": "^1.0.5",
29
29
  "typescript": "^4.7.4"
30
30
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docusaurus-2-facebook-template",
3
- "version": "2.0.1",
3
+ "version": "2.2.0",
4
4
  "private": true,
5
5
  "scripts": {
6
6
  "docusaurus": "docusaurus",
@@ -18,8 +18,8 @@
18
18
  "format:diff": "prettier --config .prettierrc --list-different \"**/*.{js,jsx,ts,tsx,md,mdx}\""
19
19
  },
20
20
  "dependencies": {
21
- "@docusaurus/core": "2.0.1",
22
- "@docusaurus/preset-classic": "2.0.1",
21
+ "@docusaurus/core": "2.2.0",
22
+ "@docusaurus/preset-classic": "2.2.0",
23
23
  "@mdx-js/react": "^1.6.22",
24
24
  "clsx": "^1.2.1",
25
25
  "react": "^17.0.2",
@@ -25,10 +25,12 @@ module.exports = {
25
25
  // But you can create a sidebar manually
26
26
  /*
27
27
  tutorialSidebar: [
28
+ 'intro',
29
+ 'hello',
28
30
  {
29
31
  type: 'category',
30
32
  label: 'Tutorial',
31
- items: ['hello'],
33
+ items: ['tutorial-basics/create-a-document'],
32
34
  },
33
35
  ],
34
36
  */
@@ -14,7 +14,9 @@ Anything **unclear** or **buggy** in this tutorial? [Please report it!](https://
14
14
 
15
15
  ## What's next?
16
16
 
17
- - Read the [official documentation](https://docusaurus.io/).
17
+ - Read the [official documentation](https://docusaurus.io/)
18
+ - Modify your site configuration with [`docusaurus.config.js`](https://docusaurus.io/docs/api/docusaurus-config)
19
+ - Add navbar and footer items with [`themeConfig`](https://docusaurus.io/docs/api/themes/configuration)
18
20
  - Add a custom [Design and Layout](https://docusaurus.io/docs/styling-layout)
19
21
  - Add a [search bar](https://docusaurus.io/docs/search)
20
22
  - Find inspirations in the [Docusaurus showcase](https://docusaurus.io/showcase)
@@ -44,11 +44,13 @@ It is also possible to create your sidebar explicitly in `sidebars.js`:
44
44
  ```js title="sidebars.js"
45
45
  module.exports = {
46
46
  tutorialSidebar: [
47
+ 'intro',
48
+ // highlight-next-line
49
+ 'hello',
47
50
  {
48
51
  type: 'category',
49
52
  label: 'Tutorial',
50
- // highlight-next-line
51
- items: ['hello'],
53
+ items: ['tutorial-basics/create-a-document'],
52
54
  },
53
55
  ],
54
56
  };
@@ -19,10 +19,12 @@ const sidebars = {
19
19
  // But you can create a sidebar manually
20
20
  /*
21
21
  tutorialSidebar: [
22
+ 'intro',
23
+ 'hello',
22
24
  {
23
25
  type: 'category',
24
26
  label: 'Tutorial',
25
- items: ['hello'],
27
+ items: ['tutorial-basics/create-a-document'],
26
28
  },
27
29
  ],
28
30
  */