Skip to content

Commit

Permalink
Renamed items in kbn-babel-preset
Browse files Browse the repository at this point in the history
Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
  • Loading branch information
kavilla committed Mar 4, 2021
1 parent 7d6fa6d commit b760d01
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @kbn/babel-preset
# @osd/babel-preset

This package contains the shared bits of babel config that we use for transpiling our source code to code compatible with Node.JS and the various [browsers we support](https://www.elastic.co/support/matrix#matrix_browsers).

Expand All @@ -7,15 +7,15 @@ This package contains the shared bits of babel config that we use for transpilin
To use our presets add the following to the devDependencies section of your package.json:

```
"@kbn/babel-preset": "1.0.0",
"@osd/babel-preset": "1.0.0",
```

Then run `yarn kbn bootstrap` to properly link the package into your plugin/package.
Then run `yarn osd bootstrap` to properly link the package into your plugin/package.

Finally, add either `@kbn/babel-preset/node_preset` or `@kbn/babel-preset/webpack_preset` to your babel config.
Finally, add either `@osd/babel-preset/node_preset` or `@osd/babel-preset/webpack_preset` to your babel config.

`@kbn/babel-preset/node_preset` is usually placed in a [`babel.config.js` file](https://babeljs.io/docs/en/configuration#babelconfigjs).
`@osd/babel-preset/node_preset` is usually placed in a [`babel.config.js` file](https://babeljs.io/docs/en/configuration#babelconfigjs).

`@kbn/babel-preset/webpack_preset` is usually placed directly in your `webpack` configuration.
`@osd/babel-preset/webpack_preset` is usually placed directly in your `webpack` configuration.

***NOTE:*** If you're transpiling code that will be run in both the browser and node you must transpile your code twice, once for each target. Take a look at the build tasks for `@kbn/i18n` to see how that can look.
***NOTE:*** If you're transpiling code that will be run in both the browser and node you must transpile your code twice, once for each target. Take a look at the build tasks for `@osd/i18n` to see how that can look.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ module.exports = (_, options = {}) => {
targets: {
// only applies the necessary transformations based on the
// current node.js processes version. For example: running
// `nvm install 8 && node ./src/cli` will run kibana in node
// version 8 and babel will stop transpiling async/await
// `nvm install 8 && node ./src/cli` will run OpenSearch Dashboards
// in node version 8 and babel will stop transpiling async/await
// because they are supported in the "current" version of node
node: 'current',
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@kbn/babel-preset",
"name": "@osd/babel-preset",
"version": "1.0.0",
"private": true,
"license": "Apache-2.0",
"kibana": {
"opensearchDashboards": {
"devOnly": true
},
"dependencies": {
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit b760d01

Please sign in to comment.