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

optimusprime

v0.2.3

Published

Optimus Prime is a babel-jest Transformer.

Downloads

5

Readme

                          /[-])//  ___
                     __ --\ `_/~--|  / \
                   /_-/~~--~~ /~~~\\_\ /\
                   |  |___|===|_-- | \ \ \
 _/~~~~~~~~|~~\,   ---|---\___/----|  \/\-\
 ~\________|__/   / // \__ |  ||  / | |   | |
          ,~-|~~~~~\--, | \|--|/~|||  |   | |
          [3-|____---~~ _--'==;/ _,   |   |_|
                      /   /\__|_/  \  \__/--/

Optimus Prime is a Transformer (okay, it’s an instance of a babel-jest transformer).

About This Repository

This repository is a part of the Byte-Sized JavaScript Screencasts.

  _               __
 |_)   _|_  _ __ (_  o _   _   _|
 |_) \/ |_ (/_   __) | /_ (/__(_|
     /        |  _.     _. (_   _ ._ o ._ _|_
            \_| (_| \/ (_| __) (_ |  | |_) |_
                                       |
            »»  bytesized.tv  ««

Byte-Sized What?!

Byte-Sized JavaScript.

It is a compilation of short (around ten minutes) monthly screencasts about JavaScript and related technologies.

About Optimus Prime

Optimus Prime is a babel-jest transformer.

I needed to create one, because I wanted to run a set of babel transformations in jest, and then realized that jest was swallowing the transform plugins that I specified in the .babelrc file.

It took a while for me to figure things out. And then as any good open-source citizen would do, [I patched jest, and created a Pull Request][jest-patch]; however, the pull requrest got rejected, suggesting that a better way would be to create a transformer to do this task instead.

And thus, Optimus Prime was born :).

Installation

Using npm:

npm install optimusprime

Using yarn:

yarn add optimusprime

Usage

Create an OptimusPrime.js in our project root:

// ./OptimusPrime.js
module.exports = require( 'optimusprime' );

Configure jest to use Optimus Prime:

// package.json
…
  "jest": {
    "transformIgnorePatterns": [
      "<rootDir>/node_modules/(?!bytesized)"
    ],
    "transform": {
      "^.+\\.(js|jsx)$": "<rootDir>/OptimusPrime.js"
    }
  },
…

Dependencies

Optimus Prime is a jest transformer, so obviously you’ll need jest.

You will also need the current version of Node.JS with all the bells and whistles — You can install it from nodejs.org.

Note that Optimus Prime will probably work with older Node.JS versions too (unless it’s archaic like v4.x or v5.x); however, it’s being tested and developed only with the current Node.JS version at the moment.

If you have problem using Optimus Prime in an older Node.JS runtime, file an issue, and we’ll see what we can do about it ;).

Package Scripts

None at the moment.

Important Files and Folders

  • ./lib/*: The source files live here.
  • ./CHANGELOG.md: A log of what has been done since the last version.
  • ./CODE_OF_CONDUCT.md: Tells the collaborators to be nice to each other.
  • ./README.md: This very file.
  • ./.eslintrc: Used for development; configures [eslint][eslint].
  • .travis.yml: Used for CI; configures [Travis][travis].

Wanna Help?

Any help is more than appreciated.

If you want to contribute to the source code, fork this repository and create a pull request.

In lieu of a formal style guide, take care to maintain the existing coding style.

Also, don’t forget to add unit tests for any new or changed functionality.

If you want to report a bug; or share a comment or suggestion, file an issue.

I’ve Found a Bug; I Have an Idea

[For bug reports and suggestions, please file an issue][issues].

Contact Information

License

MIT-licensed. — See the license file for details.

Code of Conduct

We are committed to making participation in this project a harassment-free experience for everyone, regardless of the level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality.

See the code of conduct for details.