donejs / donejs/developer-relations
Proposal: Easier debugging across related projects
- 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
Research direction
Start by reproducing the local dependency failures described for donejs/donejs, donejs/generator-donejs, donejs/cli, and bit-docs/bit-docs. Inspect the linked issue and pull request, then trace the bit-docs/bin/bit-docs entry point and package.json handling. Done should mean local packages can be debugged without publishing to npm, with any required steps documented in the appropriate CONTRIBUTING.md.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- developer-experience, documentation, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100