Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remark npm2yarn plugin => ready to release
- Loading branch information
Showing
14 changed files
with
128 additions
and
306 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Remark plugin npm2yarn | ||
|
||
## Motivation: | ||
|
||
Transforms npm bash command code blocks to Docusaurus tabs: | ||
|
||
The following (remove the `//`): | ||
|
||
````bash | ||
// ```bash npm2yarn | ||
// npm run build | ||
// ``` | ||
```` | ||
|
||
Becomes: | ||
|
||
![npm2yarn tabs example](./example.png) | ||
|
||
**Note**: it only works when used with Docusaurus themes that have the `Tabs` and `TabItems` components. | ||
|
||
## Install | ||
|
||
```bash | ||
npm install @docusaurus/remark-plugin-npm2yarn` | ||
``` | ||
|
||
It is a Remark plugin, **not a Docusaurus plugin**, so you have to install it as a Remark plugin in the config of your Docusaurus plugins. | ||
|
||
```js | ||
module.exports = { | ||
presets: [ | ||
[ | ||
'@docusaurus/preset-classic', | ||
{ | ||
docs: { | ||
// ... | ||
remarkPlugins: [require('@docusaurus/remark-plugin-npm2yarn')], | ||
}, | ||
blog: { | ||
// ... | ||
remarkPlugins: [require('@docusaurus/remark-plugin-npm2yarn')], | ||
}, | ||
pages: { | ||
// ... | ||
remarkPlugins: [require('@docusaurus/remark-plugin-npm2yarn')], | ||
}, | ||
// ... | ||
}, | ||
], | ||
], | ||
// ... | ||
}; | ||
``` |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 0 additions & 81 deletions
81
packages/docusaurus-remark-plugin-npm2yarn/src/npm2yarn/index.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.