Skip to content
This repository has been archived by the owner on Oct 10, 2021. It is now read-only.

Running tape with custom options #268

Open
ksmithbaylor opened this issue Feb 17, 2016 · 2 comments
Open

Running tape with custom options #268

ksmithbaylor opened this issue Feb 17, 2016 · 2 comments

Comments

@ksmithbaylor
Copy link

I'm testing my React components with Tape, which means I need to run the tests through babel to transpile the JSX. Here's the command I use to run my tests:

NODE_ENV=test tape -r babel-register 'src/**/*.test.js'

The important part is -r babel-register, which transpiles the code right before running it. I'm trying to use zuul with this setup, but I'm at a loss for how to pass options to tape. Is this currently possible? Or do I need to pull in browserify? The project is currently using webpack and we don't want to change that.

It may also be possible to add webpack support. For that, I could see an additional field in .zuul.yml like this:

webpack:
    config: webpack.config.js

If this is something that more people want, I'd be happy to get started on a pull request!

@defunctzombie
Copy link
Owner

It has been a long time since I have looked at the builder specific code but @andreypopp may be able to answer this better.

Basically, if you look at this https://github.com/defunctzombie/zuul/blob/279f1a1c13f15e5ba107868eb7aac96e0b0476c5/lib/builder-browserify.js you will find that the "builder" our API into an abstract builder. I think you can specify your own builders via the config but don't see any docs on that. I think if we don't currently support it then we should in some capacity. Take a look and see if that helps you implement what you need.

@vvo
Copy link
Collaborator

vvo commented Feb 18, 2016

There's a webpack builder yes: https://github.com/prometheusresearch/zuul-builder-webpack

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants