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

ratel

v1.0.1

Published

A command-line interface for HoneyBadger, a WIP ES2015+ to ES5 transpiler + bundler + minifier in Rust

Downloads

2

Readme

honey-badger-cli

A command-line interface for HoneyBadger, a WIP ES2015+ to ES5 transpiler + bundler + minifier in Rust.

Usage

honey-badger-cli [options]
honey-badger-cli --version

Options:
  -h --help                       Show this screen.
  --version                       Show version.
  -e STRING, --string=STRING      Specifies an input string.
  -f FILE, --file=FILE            Specifies the input file.
  -o FILE, --output=FILE          Specifies the output file.
  --pretty                        Don't minify the output.
  --ast                           Print out the Abstract Syntax Tree of the input.

Installing as cli executable

You can install the executable globally from NPM using npm install -g honey-badger-cli or by executing npm link in the project directory.

Running the tests

Recompiles HoneyBadger and runs all tests using Mocha.

The test suite is using node.green's compat-table which features ES2015, ES2016 and ES2017 examples.

$ npm test

Development

Execute make in the project directory. Please also refer to the scripts section of package.json.

In case you want to work on a local copy of HoneyBadger, add the following lines to native/Cargo.toml:

[dependencies.badger]
path = "../../HoneyBadger"

Programmatic usage

import Badger from 'honey-badger-cli';
const instance = new Badger();

instance.getVersion()

Returns a string containing the application's version.

instance.getUsage()

Returns a string containing usage information.

instance.process(Object options)

Transpiles the given input, returns optionally a string.

options is an object which can take the following values:

| key | type | purpose | |--------|---------|-----------------------------| | file | String | Input path. | | ast | Boolean | Whether to return the AST. | | output | String | Output path. | | string | String | Input string. |

instance.badger

Allows access to the rust module implementing the following methods:

instance.badger.transform(String string, Boolean minify)

Returns a string.

Transforms the given input string into ES5 code. When minify is set to true, the output string will be minified.

instance.badger.parse(String string)

Returns a String with the AST of the given input string.

Changelog

0.0.3

  • Updating to HoneyBadger 0.2.1
  • Updating documentation
  • Ensuring a trailing newline using -e/--string

0.0.2

  • Updating to HoneyBadger 0.2.0
  • Updating documentation
  • Adding -e/--string to provide a string
  • Adding stand-alone executable
  • Adding unit tests
  • Adding tests from node.green's compat-table
  • improved API

Licenses

  • MIT
  • Apache License Version 2.0