Skip to content
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.

Fix documentation for babel plugin #60

Merged
merged 2 commits into from
Jun 20, 2018

Conversation

Swapnull
Copy link
Contributor

@Swapnull Swapnull commented Jun 19, 2018

Description

Add here a description about your Pull Request

The README for docz-plugin-babel6 currently wont work.

It currently says

import { babel } from 'docz-plugin-babel6'
export default { plugins[babel6()] };

But this will result in 'babel6 is not defined'

In this PR I have changed the export name from the plugin to be babel6 as this makes most sense to me.
It would possibly be safer, but may make less sense, to just update the README to either

  • change the import to import { babel as babel6 }
  • keep the current import and do plugins[babel()], which is less descriptive.

Review

  • Test out the new plugin

@pedronauck
Copy link
Member

the plugin export a variable called babel @Swapnull, just change it, please 🙏

@pedronauck
Copy link
Member

pedronauck commented Jun 19, 2018

sorry @Swapnull, maybe I didn't so clear... but I had asked you to change to the correct value exported. Change the exported value now I'll result in a break change version, so I think that is better keep the value exported as babel. So, just change on readme to be correct, please 🙏

@@ -9,7 +9,7 @@ const modifyHappypackLoader = (plugin: any) => {
plugin.config.loaders[0].loader = require.resolve('babel-loader')
}

export const babel = () =>
Copy link
Member

Choose a reason for hiding this comment

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

please keep as babel 🙏

@@ -3,7 +3,7 @@
By default and by some performance issues, Docz use Babel@7. If you want to use older versions of babel import this plugin and use on your `doczrc.js`:

```js
import { babel } from 'docz-plugin-babel6'
Copy link
Member

Choose a reason for hiding this comment

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

keep this as babel too ✌️

@Swapnull
Copy link
Contributor Author

@pedronauck I have changed it back to exporting babel and updated the readme 😄

@Swapnull Swapnull changed the title rename plugin export to babel6 Fix documentation for babel plugin Jun 19, 2018
@pedronauck pedronauck merged commit 8a14e2a into doczjs:master Jun 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants