Giter Site home page Giter Site logo

zerotohero-dev / optimusprime Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 25 KB

Optimus Prime is a Transformer.

Home Page: https://bytesized.tv/

License: MIT License

JavaScript 48.07% Shell 51.93%
transformer optimus-prime vidcast javascript jest babel tutorials demos trainings podcast

optimusprime's Introduction

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

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

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.

A ByteSized.TV Project

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

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

Learn, explore, and have fun!

optimusprime's People

Contributors

v0lkan avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.