Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

passing config file #59

Closed
rupeshtiwari opened this issue May 29, 2018 · 1 comment
Closed

passing config file #59

rupeshtiwari opened this issue May 29, 2018 · 1 comment

Comments

@rupeshtiwari
Copy link

Hi,
I want to know is there a way I can pass config from json file ?
I wrote json file however not sure how to pass the regular expression from json file.
When I use below code it is not working

    "watchConfig": {
        "recursive": true,
        "filter": "/\\.tests.ts$/"
    },
@rupeshtiwari
Copy link
Author

I managed it using filter function.

const settings = {
        ...config.watchConfig,
        filter: (f: string) => new RegExp(config.watchConfig.filter).test(f),
    };

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

No branches or pull requests

1 participant