Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

broccoli-es6-module-filter

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

broccoli-es6-module-filter

broccoli filter for es6 modules

  • 0.1.9
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

broccoli-es6-module-filter

Build Status

Transpile modules authored in ES6 to other module types.

Installation

npm install --save broccoli-es6-module-filter

Usage (Sample Brocfile.js)

var filterES6Modules = require('broccoli-es6-module-filter');
var pickFiles = require('broccoli-static-compiler');

module.exports = function (broccoli) {

  // say we're creating a third-party component, we'd house our
  // source code in './lib'
  var tree = broccoli.makeTree('lib');

  // create a CJS version
  var cjsTree = filterES6Modules(pickFiles(tree, {
    srcDir: '/',
    destDir: '/cjs'
  }));

  // and AMD
  var amdTree = filterES6Modules(pickFiles(tree, {
    srcDir: '/',
    destDir: '/amd'
  }), {
    moduleType: 'amd'
  });

  return [cjsTree, amdTree];
};

And then from the command line:

$ broccoli build output

Options

  • moduleType - amd or cjs

  • anonymous - for amd output, whether or not to name your modules.

  • packageName - for named-amd output, prepends packageName/ to your module names

  • main - for named-amd output, which file is the main entry point of your module that will be returned with require(['your-package'])

  • every other option supported by the transpiler

Keywords

FAQs

Package last updated on 07 Apr 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc