Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/create-docusaurus/templates/shared/docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Generate a new Docusaurus site using the **classic template**.

The classic template will automatically be added to your project after you run the command:

```bash
```bash npm2yarn
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we should mvoe this change to #8650

npm init docusaurus@latest my-website classic
```

Expand All @@ -35,7 +35,7 @@ The command also installs all necessary dependencies you need to run Docusaurus.

Run the development server:

```bash
```bash npm2yarn
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we should mvoe this change to #8650

cd my-website
npm run start
```
Expand Down
2 changes: 1 addition & 1 deletion packages/docusaurus-remark-plugin-npm2yarn/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"license": "MIT",
"dependencies": {
"npm-to-yarn": "^1.0.1",
"@armano/npm-to-yarn": "^1.1.2",
"tslib": "^2.4.0",
"unist-util-visit": "^2.0.3"
},
Expand Down
7 changes: 2 additions & 5 deletions packages/docusaurus-remark-plugin-npm2yarn/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,16 @@ import type {Code, Content, Literal} from 'mdast';
import type {Plugin} from 'unified';
import type {Node, Parent} from 'unist';
import visit from 'unist-util-visit';
import npmToYarn from 'npm-to-yarn';
import {convertToYarn} from '@armano/npm-to-yarn';

type PluginOptions = {
sync?: boolean;
};

// E.g. global install: 'npm i' -> 'yarn'
const convertNpmToYarn = (npmCode: string) => npmToYarn(npmCode, 'yarn');

const transformNode = (node: Code, isSync: boolean) => {
const groupIdProp = isSync ? ' groupId="npm2yarn"' : '';
const npmCode = node.value;
const yarnCode = convertNpmToYarn(node.value);
const yarnCode = convertToYarn(node.value);
return [
{
type: 'jsx',
Expand Down
1 change: 1 addition & 0 deletions project-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ apos
appinstalled
applanga
architecting
armano
astro
atrule
autoconverted
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,11 @@
jsonpointer "^5.0.0"
leven "^3.1.0"

"@armano/npm-to-yarn@^1.1.2":
version "1.1.2"
resolved "https://registry.yarnpkg.com/@armano/npm-to-yarn/-/npm-to-yarn-1.1.2.tgz#3518758123bf1bdb447949053721d283fc8bf2ae"
integrity sha512-rDxYtk9LEZqZkLth/sIZLmC4boUgSKY/8/zgd+OA9x8W2s2MAPAcxGlfvBpIkXloEFKt3OLgfHVSWTFR1f3YpA==

"@babel/cli@^7.17.10":
version "7.17.10"
resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.17.10.tgz#5ea0bf6298bb78f3b59c7c06954f9bd1c79d5943"
Expand Down Expand Up @@ -11153,11 +11158,6 @@ npm-run-path@^4.0.1:
dependencies:
path-key "^3.0.0"

npm-to-yarn@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/npm-to-yarn/-/npm-to-yarn-1.0.1.tgz#6cdb95114c4ff0be50a7a2381d4d16131a5f52df"
integrity sha512-bp8T8oNMfLW+N/fE0itFfSu7RReytwhqNd9skbkfHfzGYC+5CCdzS2HnaXz6JiG4AlK2eA0qlT6NJN1SoFvcWQ==

npmlog@^4.0.1, npmlog@^4.1.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b"
Expand Down