Is it possible to install the entire folder from Github?

(Eight) #1

I have two projects. Let’s call them Project A and Project B.

Project A has some test files that I use files array to ignore them so they won’t be published to the registry.

Project B also has some tests, which extend the test from Project A. I tried to install Project A from Github as the dev dependency, but it seems that even if the package is installed from Github, test files are still excluded.

Here are the questions:

  1. When installing packages from Github, file exclusion still works. Is this intended? I thought file exclusion only works when you publish the package.
  2. How do I make Project B depend on the test of Project A? Should I publish the test as a new package?

(Markus Tacker) #2

No, it describes which files to install. That’s why it makes sense to filter also from GitHub installs.

I had situations like this previously, and I see no problem in including the test files in the published package of A (but not export them in your main script), so that B can depend on A. And in the tests of B you can then require the files via their installed path: node_modules/A/test/....

(system) #3

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.