Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/emorikawa/babel-preset-electron
Babel preset for all plugins needed with the latest electron
https://github.com/emorikawa/babel-preset-electron
Last synced: 3 months ago
JSON representation
Babel preset for all plugins needed with the latest electron
- Host: GitHub
- URL: https://github.com/emorikawa/babel-preset-electron
- Owner: emorikawa
- License: mit
- Created: 2016-05-04T21:40:24.000Z (over 8 years ago)
- Default Branch: 37.8
- Last Pushed: 2017-02-16T23:03:02.000Z (over 7 years ago)
- Last Synced: 2024-06-18T21:36:34.179Z (5 months ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 46
- Watchers: 2
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-electron - babel-preset-electron - Babel preset that only compiles what's necessary for a particular Electron version. ![](https://img.shields.io/github/stars/emorikawa/babel-preset-electron.svg?style=social&label=Star) (Library / Uncategorized)
- awesome-electron-zh - babel-preset-electron - Babel preset that only compiles what's necessary for a particular Electron version. (Tools / For Electron)
README
# babel-preset-electron
> Babel preset with all plugins for Electron.
## Install
#### Electron 37.8
```sh
$ npm install --save-dev [email protected]
```## Usage
### Via `.babelrc` (Recommended)
**.babelrc**
```json
{
"presets": ["electron"]
}
```### Via CLI
```sh
$ babel script.js --preset electron
```### Via Node API
```javascript
require("babel-core").transform("code", {
presets: ["electron"]
});
```