donejs / donejs/developer-relations

Proposal: Easier debugging across related projects

Open
#29 4 comments 0 reactions 0 assignees View on GitHub
easy enhancement
Dominant language
JavaScript
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

I propose we make it easier to locally debug interdependent projects.

I've run into three instances so far (outlined below) where I've had to modify source code when, ideally, I should have just been able to add my local dependency to `package.json` and that's it.

We need to facilitate these common workflows (probably a couple `if` checks in the various source codes would suffice) and should document any additional steps in the appropriate `CONTRIBUTING.md`

---

#### 1: `donejs/donejs` + `donejs/generator-donejs`

https://github.com/donejs/generator-donejs/issues/135#issuecomment-284203738

---

#### 2: `donejs/donejs` + `donejs/cli`

https://github.com/donejs/cli/pull/82#issuecomment-289615878

---

#### 3: `bit-docs/bit-docs` + project using `bit-docs` + local html generation plugin

I have to publish my package:

https://www.npmjs.com/package/bit-docs-website-theme

Just in order to use it locally. Seems like I should be able to do:

```
"bit-docs-website-theme": "file:///Users/leoj/src/bitovi/wip/bit-docs-website-theme"
```

In `package.json`, but that causes a 404 failure because some part of code insists on DLing from npm when I do `./node_modules/bit-docs/bin/bit-docs -fd`.

So, I was forced to publish this package just to test it out, because I can't locate the bit of code that is attempting npm download, and making everything fail.

It's probably a similar case to that which I ran into when trying to locally debug the DoneJS CLI:

https://github.com/donejs/generator-donejs/issues/135#issuecomment-289917095

It seems like there must be some facility for debugging packages locally, without having to publish to npm constantly?

There must be a better way than adding `INJECTING LOCAL COPY` hacks (like I do in the link below), Right?

https://github.com/donejs/cli/pull/82#issuecomment-289615878

If not, a facility to allow local debugging would be a great thing to add into the frameworks in these places where it currently forces the use of remote npm.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.