broccoli-babel-preset-typescript

1.0.1 • Public • Published

broccoli-babel-preset-typescript ci

A broccoli plugin which only removes TypeScript types

installation

yarn add --save broccoli-babel-preset-typescript

or

npm install --save broccoli-babel-preset-typescript

Usage

Within a Broccoli Pipeline

const { BroccoliBabelPresetTypeScript } = require('BroccoliBabelPresetTypeScript');

// now in your broccoli pipeline
const output = new BroccoliBabelPresetTypeScript([inputNode]);

Advanced Example - A standalone script

#!/usr/bin/env node
'use strict';

const { Builder } = require('builder');
const { BroccoliBabelPresetTypeScript } = require('broccoli-babel-preset-typescript');
const TreeSync = require('tree-sync');

const [
  ,
  ,
  inputDirectory,
  outputDirectory,
] = process.argv;

const plugin = new BroccoliBabelPresetTypeScript([inputDirectory]);
const builder = new Builder(plugin);

(async function main() {
  try {
    const { directory } = await builder.build();
    const tree = new TreeSync(directory, outputDirectory);
    tree.sync();
  } finally {
    await builder.cleanup();
  }
}());

options:

sourceMaps:

  • true will produce a sibling source-map file, and the required sourceMappingURL
  • inline will append a sourceMappingURL that contains a data URI of the sourcemapping
  • both will have the behavior of both true and inline
  • false or when omitted, will result in no sourcemaps being created (the default)

Readme

Keywords

none

Package Sidebar

Install

npm i broccoli-babel-preset-typescript

Weekly Downloads

897

Version

1.0.1

License

none

Unpacked Size

19.3 kB

Total Files

6

Last publish

Collaborators

  • stefanpenner