@babel/plugin-transform-modules-amd
Advanced tools
Comparing version 7.0.0-beta.49 to 7.0.0-beta.50
{ | ||
"name": "@babel/plugin-transform-modules-amd", | ||
"version": "7.0.0-beta.49", | ||
"version": "7.0.0-beta.50", | ||
"description": "This plugin transforms ES2015 modules to AMD", | ||
@@ -9,4 +9,4 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-modules-amd", | ||
"dependencies": { | ||
"@babel/helper-module-transforms": "7.0.0-beta.49", | ||
"@babel/helper-plugin-utils": "7.0.0-beta.49" | ||
"@babel/helper-module-transforms": "7.0.0-beta.50", | ||
"@babel/helper-plugin-utils": "7.0.0-beta.50" | ||
}, | ||
@@ -20,5 +20,5 @@ "keywords": [ | ||
"devDependencies": { | ||
"@babel/core": "7.0.0-beta.49", | ||
"@babel/helper-plugin-test-runner": "7.0.0-beta.49" | ||
"@babel/core": "7.0.0-beta.50", | ||
"@babel/helper-plugin-test-runner": "7.0.0-beta.50" | ||
} | ||
} |
# @babel/plugin-transform-modules-amd | ||
> This plugin transforms ES2015 modules to [Asynchronous Module Definition (AMD)](https://github.com/amdjs/amdjs-api). | ||
> This plugin transforms ES2015 modules to AMD | ||
## Example | ||
See our website [@babel/plugin-transform-modules-amd](https://new.babeljs.io/docs/en/next/babel-plugin-transform-modules-amd.html) for more information. | ||
**In** | ||
## Install | ||
```javascript | ||
export default 42; | ||
``` | ||
Using npm: | ||
**Out** | ||
```javascript | ||
define(["exports"], function (exports) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = 42; | ||
}); | ||
``` | ||
## Installation | ||
```sh | ||
npm install --save-dev @babel/plugin-transform-modules-amd | ||
npm install --save @babel/plugin-transform-modules-amd | ||
``` | ||
## Usage | ||
or using yarn: | ||
### Via `.babelrc` (Recommended) | ||
**.babelrc** | ||
```json | ||
{ | ||
"plugins": ["@babel/plugin-transform-modules-amd"] | ||
} | ||
``` | ||
### Via CLI | ||
```sh | ||
babel --plugins @babel/plugin-transform-modules-amd script.js | ||
yarn add --save @babel/plugin-transform-modules-amd | ||
``` | ||
### Via Node API | ||
```javascript | ||
require("@babel/core").transform("code", { | ||
plugins: ["@babel/plugin-transform-modules-amd"] | ||
}); | ||
``` | ||
### Options | ||
See options for `@babel/plugin-transform-modules-commonjs`. |
4422
3
20
+ Added@babel/helper-module-imports@7.0.0-beta.50(transitive)
+ Added@babel/helper-module-transforms@7.0.0-beta.50(transitive)
+ Added@babel/helper-plugin-utils@7.0.0-beta.50(transitive)
+ Added@babel/helper-simple-access@7.0.0-beta.50(transitive)
+ Added@babel/helper-split-export-declaration@7.0.0-beta.50(transitive)
- Removed@babel/helper-module-imports@7.0.0-beta.49(transitive)
- Removed@babel/helper-module-transforms@7.0.0-beta.49(transitive)
- Removed@babel/helper-plugin-utils@7.0.0-beta.49(transitive)
- Removed@babel/helper-simple-access@7.0.0-beta.49(transitive)
- Removed@babel/helper-split-export-declaration@7.0.0-beta.49(transitive)