Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including babel-preset-gas with all npm packages installed. Try it out:

require("@babel/core/package.json"); // @babel/core is a peer dependency. var babelPresetGas = require("babel-preset-gas")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

babel-preset-gas v2.0.4

Babel preset for all Goolge Apps Script plugins.

babel-preset-gas

Babel preset for all Goolge Apps Script plugins.

This preset includes the following plugins:

Example

In

export.default {
  default: true
}

Out

export["default"] = {
  "default": true
}

Installation

npm install --save-dev babel-preset-gas

Usage

Via .babelrc (Recommended)

.babelrc

{
  "presets": ["gas"]
}

Via CLI

babel --presets gas script.js

Via Node API

require("@babel/core").transform("code", {
  plugins: ["gas"]
});
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free