@babel/standalone

  • Version 8.0.5
  • Published
  • 31.5 MB
  • 3 dependencies
  • MIT license

Install

npm i @babel/standalone
yarn add @babel/standalone
pnpm add @babel/standalone

Overview

Standalone build of Babel for use in non-Node.js environments.

Index

Variables

variable availablePlugins

const availablePlugins: Record<string, any>;

    variable availablePresets

    const availablePresets: Record<
    | 'env'
    | 'es2015'
    | 'es2016'
    | 'es2017'
    | 'react'
    | 'stage-0'
    | 'stage-1'
    | 'stage-2'
    | 'stage-3'
    | 'es2015-loose'
    | 'es2015-no-commonjs'
    | 'typescript'
    | 'flow',
    any
    >;

      variable buildExternalHelpers

      const buildExternalHelpers: any;

        variable version

        const version: string;

          Functions

          function disableScriptTags

          disableScriptTags: () => void;
          • Disables automatic transformation of tags with "text/babel" type.

          function registerPlugin

          registerPlugin: (name: string, plugin: () => PluginObject) => void;
          • Registers a named plugin for use with Babel.

          function registerPlugins

          registerPlugins: (newPlugins: Record<string, () => PluginObject>) => void;
          • Registers multiple plugins for use with Babel. newPlugins should be an object where the key is the name of the plugin, and the value is the plugin itself.

          function registerPreset

          registerPreset: (name: string, preset: () => PresetObject) => void;
          • Registers a named preset for use with Babel.

          function registerPresets

          registerPresets: (newPresets: Record<string, () => PresetObject>) => void;
          • Registers multiple presets for use with Babel. newPresets should be an object where the key is the name of the preset, and the value is the preset itself.

          function transform

          transform: (code: string, options: InputOptions) => FileResult | null;

            function transformAsync

            transformAsync: (
            code: string,
            options: InputOptions
            ) => Promise<FileResult | null>;

              function transformFromAst

              transformFromAst: (
              ast: Parameters<typeof transformFromAstSync>[0],
              code: string,
              options: InputOptions
              ) => FileResult | null;

                function transformFromAstAsync

                transformFromAstAsync: (
                ast: Parameters<typeof transformFromAstAsync$1>[0],
                code: string,
                options: InputOptions
                ) => Promise<FileResult | null>;

                  function transformScriptTags

                  transformScriptTags: (scriptTags?: HTMLCollectionOf<HTMLScriptElement>) => void;
                  • Transform tags with "text/babel" type.

                    Parameter scriptTags

                    specify script tags to transform, transform all in the if not given

                  Namespaces

                  namespace packages

                  namespace packages {}

                    Package Files (1)

                    Dependencies (3)

                    Dev Dependencies (97)

                    Peer Dependencies (0)

                    No peer dependencies.

                    Badge

                    To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                    You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@babel/standalone.

                    • Markdown
                      [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@babel/standalone)
                    • HTML
                      <a href="https://www.jsdocs.io/package/@babel/standalone"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>