npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

bubleify

v2.0.0

Published

Browserify transform that compiles es2015 to es5 using Bublé

Downloads

69,626

Readme

Bubléify build status Coverage Status

A browserify transform for Bublé to transform ES2015 to ES5.

Installation

npm install --save-dev bubleify

Usage

Node

const browserify = require('browserify');
const bubleify = require('bubleify');

const b = browserify();
b.add('./file.es2015.js'));
b.transform(bubleify, {
  target: {
    chrome: 48,
    firefox: 44,
  },
  transforms: {
    arrow: true,
    defaultParameter: false,
    dangerousForOf: true,
  },
});
b.bundle();

CLI

browserify script.js -o bundle.js -t [ bubleify ]

Options

target: Object

Target specifies a list of environments the output file should be compatible to. Bublè will decide based on this list which transforms should be used.

transforms: Object

Transforms define which ES2015 features should or should not be transformed into ES5.

Bublèify by default disables the module transform to not throw an error when ES2015 import and export statements are used. If you want to use ES2015 modules you should add another transform to do so.

Find a list of all transforms on the Bublè documentation in section list of transforms. For more detailed information about each transform also see supported features and dangerous transforms.

sourceMap: Boolean

Define whether an inline source map should or should not be created by Bublé.

Default is true.

Please note that browserify will not output any source map if debug mode is false, even if sourceMap was set to true.

extensions: Array

The allowed file extensions that should be transformed with Bublé. Files included into the stream that do not match an extension will be ignored by Bubléify.

Default is ['.js', '.jsx', '.es', '.es6'].

bubleError: Boolean

Define whether the error generated by Bublè or a the Bublè error message as a string should be emitted in case of an error.

Default is false.

Bublè may in some situations throw a custom error. Browserify will, when used on the command line, just output the call stack in this situation but does not show the error message. Turning this option on will display the error message but suppresses the call stack.

Credits

Thanks goes to Rich Harris for the Bublè package.

License

Licensed under the MIT License.