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

babel-preset-modern-async

v1.0.0-alpha.3

Published

Cutting edge Babel preset using 'fast-async' instead of generators for async/await. Also configurable for Electron.

Downloads

14

Readme

babel-preset-modern-async

Semi-opinionated preset for Babel based on babel-preset-latest but using fast-async for async/await transpilation instead of generators. Also includes configuration options for using Bluebird as the Promise library, targeting Electron, and setting a stage ( ie. stage-0 )

Install

npm i babel-preset-modern-async

Usage

Minimum configuration:

{
  "presets": ["modern-async"]
}

You can also pass in a configuration object ( configuration intensifies ):

{
  "presets": [["modern-async", {
    "fast-async": {
      "env": {
        "augmentObject": false,
        "dontMapStackTraces": true,
        "dontInstallRequireHook": true
      },
      "compiler": {
        "promises": true,
        "generators": false
      },
      "runtimePattern": "directive",
      "useRuntimeModule": false
    },
    "electron": false,
    "promise": "bluebird",
    "stage": 0
  }]]
}

The above are the default options, the bulk of which come from fast-async. The rest:

  • electron

    When set to true, many plugins will be excluded that the Electron environment natively supports. Similar to the babel-preset-electron preset.

  • promise

    Determines the Promise implementation, which is left native (or whatever you use at runtime) when this option is anything but 'bluebird' (currently the only option with any affect). When set to 'bluebird', the bluebird library is automatically inserted and all Promise references use it without further configuration.

    NOTE: The bluebird library is not a dependency of this preset. If you intend to use this option, you must install it yourself.

  • stage

    A number representing the ES feature stage to use in addition to the latest preset. These correspond to the Babel -stage-* presets.

More advanced configuration notes are in progress.

License

MIT © Bo Lingen / citycide

See LICENSE