thlorenz/es6ify

Correctly config filePattern in package.json?

Closed this issue · 6 comments

I'm trying to configure filePattern options in package.json so running browserify from command line works, but I'm stuck here

{
  ...
  "browserify": {
    "transform": [
      ["es6ify", {"config": "???"} ],
    ]
  }
  ...
}

What should I put there? JSON doesn't take Regular Expression literals.

Transform config is currently not supported :(
Please use es6ify as described in the Readme.

However I'd love a PR that adds this feature. Be aware though that a general API change is pending

@riobard Do you know of any other library that implements this type of configuration I would like to learn how they did it? Thanks.

@guzart actually it's quite simple, you just get passed an extra arg opts to the transform function as you can see from this type signature.

This is only true for the latest browserify versions (I believe >=v3 but am not entirely sure).

tmcw commented

@thlorenz should this be open if it's still a TODO?

@tmcw no, it's not an issue and I'm not sure it's important to have ATM.
So I closed it although I'm open to a PR that adds this feature.

Since transform config isn't supported anyone know how to configure (filePattern) es6ify while using it on karma test runner?