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

@jict/babel-preset

v0.0.26

Published

org-wide Babel preset.

Downloads

109

Readme

@jict/babel-preset

npm version

org-wide Babel preset.

Installation

$ yarn add --dev @jict/babel-preset

Usage

Install this package, as well as the parts of Babel you wish to use:

With Yarn

yarn add --dev --exact babel-core @jict/babel-preset

With npm

npm install babel-core @jict/babel-preset --save-dev --save-exact

Then, in your Babel configuration (which should be under the babel key of your package.json), set this package as the babel preset you'd like to use:

{
  "babel": {
    "presets": ["@jict/babel-preset"]
  }
}

Preset

The @jict/babel-preset preset is designed to be a common import that can be used for the browser or the server.

Usage

{
  "babel": {
    "presets": [
      ["@jict/babel-preset", {"typescript": true}]
    ]
  }
}

Targets

This preset does not specify any targets to control what is transpiled. You should use Babel's top-level targets option to specify build targets. For instance to target the current node version:

{
  "targets": "current node",
  "presets": ["@jict/babel-preset"],
  "plugins": ["polyfill-es-shims"]
}

See more details here.

Options

corejs, debug, modules, useBuiltIns

These options come from the @babel/preset-env preset and match the default values.

Read the options for more information on the possible values.

typescript

Enables @babel/preset-typescript to transfrom TypeScript into Javascript.

typescriptOptions

See all available options.

transformRuntime

boolean, defaults to false

This option when true will enable the @babel/plugin-transform-runtime plugin.

transformRuntimeOptions

This option configures the @babel/plugin-transform-runtime plugin when the transformRuntime option has been enabled.

See available options.

react

boolean, defaults to false.

This option when true will enable the @babel/preset-react preset.

reactOptions

The following options are different from the defaults. See all available options here.

reactOptions.useBuiltIns

boolean, defaults to true

Will use the native built-in instead of trying to polyfill behavior for any plugins that require one.

reactOptions.useSpread

boolean, defaults to true

When spreading props, use inline object with spread elements directly instead of Babel's extend helper or Object.assign.

transformReactConstantElements

boolean, defaults to false.

This option when true will enable the @babel/plugin-transform-react-constant-elements plugin in production mode.

Documentation