Coder Social home page Coder Social logo

next-e / are-you-es5 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from obahareth/are-you-es5

0.0 1.0 0.0 2.97 MB

A package to help you find out which of your node_modules aren't ES5 so you can add them to your Webpack/Rollup/Parcel transpilation steps.

License: MIT License

TypeScript 92.69% JavaScript 7.31%

are-you-es5's Introduction

are-you-es5

A package to help you find out which of your node_modules aren't written in ES5 so you can add them to your Webpack/Rollup/Parcel transpilation steps. This is currently limited to checking the entrypoint scripts only, which might actually be enough of a check to determine if a package should be transpiled or not.

Installing

You can install the package globally with

npm install -g are-you-es5

or if you'd rather just run it immediately you can use npx:

npx are-you-es5 check /path/to/some/repo

Aliasing

If you've installed it globally and find it tiresome to type are-you-es5 a lot, you can alias it to es5:

alias es5="are-you-es5"

Upgrading from 1.1

If you were on version 1.1, the -a or -all option used to be for logging all messages, this has now changed to -v or --verbose and -a and -all are now used as a flag to check all node modules.

Upgrading to 1.3

1.3 Now by default skips checking anything that has the word babel or webpack, or if a string ends with loader. To restore previous behavior use the --no-regex-filtering option.

Usage

Usage: are-you-es5 check [options] <path>

Checks if all node_modules (including monorepos) at <path> are ES5

Options:
  -a, --all             Check all node_modules instead of just direct dependencies
  -v, --verbose         Log all messages (including modules that are ES5)
  --no-regex-filtering  Stops all filtering on babel-loader exclude regex (does not hide anything)
  -r, --regex           Get babel-loader exclude regex to ignore all node_modules except non-ES5 ones, by default does not show any babel or webpack modules, use with --no-regex-filtering if you want to see everything
  -h, --help            output usage information

Example

are-you-es5 check /path/to/some/repo -r
❌ @babel/plugin-1 is not ES5
❌ @babel/plugin-2 is not ES5

Babel-loader exclude regex:

/node_modules/(?![plugin-1|plugin-2])/

Credits

  • acorn - All the actual ES5 checking happens through acorn, this package wouldn't exist without it.
  • es-check - This whole package wouldn't have been possible if I hadn't come across es-check and learned from it.

are-you-es5's People

Contributors

obahareth avatar depoulo avatar dependabot[bot] avatar

Watchers

James Cloos 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.