Proposal: Easier debugging across related projects

Open
#29 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
javascript

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.

Description

easy enhancement

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.

Dominant language
JavaScript
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from donejs/developer-relations

All issues in donejs/developer-relations

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.