Experience-Monks / Experience-Monks/devtool

Support more flags in devtoolrc

Open
#116 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
3.7k
Forks
147
PR merge metrics
No merged PRs in 30d

Description

Hey,

## Context

I'm trying to debug my tests using `ava` and `devtool`.
For my project, I've managed to do it like so: `NODE_ENV=test devtool node_modules/ava/profile.js test/dfs-pre.js -r babel-register`

Note that I need to put `devtool` flags at the end as `profile.js` reads arguments at specific positions. That said I use this command line in a `npm` script to which I pass the file I want to debug.

**package.json**
```json
{
"scripts": {
"debugfile": "NODE_ENV=test devtool node_modules/ava/profile.js -r babel-register"
}
}
```

**cli**
```sh
$ yarn debugfile test/dfs-pre.js
```

**result**
```sh
NODE_ENV=test devtool node_modules/ava/profile.js -r babel-register test/dfs-pre.js
```

## Problem

The problem is that I need my `test/foo.js` to be the 3rd argument. The flags of `devtool` conflict with this.

## Proposal

In order to be able to start `devtool` without any flags, it would be super nice to be able to make them available in `.devtoolrc`. The most urgent for me would be `require`.

Thanks!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.