D
D
Dimka52019-03-03 13:39:53
JavaScript
Dimka5, 2019-03-03 13:39:53

How to split a project into several independent ones, then connect and use them in one?

For example.
I am doing the main JS project for it, a GIT repository is created on the local computer, there is a package.json where the dependencies for npm, that is, third-party projects, are indicated. In the process, several logical parts were formed that would be nice to take out, each into a separate local repository (and not take it from GitHub or npm), work with them separately from the main project, and then specify the path on your computer to this repository ("C: /path_to_repository") and connect to the main project.
How to do it? What tool to use?
Do I need an assembler? Which Gulp, Grunt, ...? Do they know how to work with local repositories and where it is indicated, do they understand that this is a repository and not just a set of files, while looking through the documentation, I did not find how this can be done, I have not used collectors before.
I heard about Yarn, there are many projects where it is used, will it help? separately or in a bundle?
It is not necessary to tell in detail, you can just link to a place in the documentation, to a description of the feature, where there is something similar.
Should dependencies on local repositories be specified in package.json? as? who will take them?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir, 2019-03-03
@Dimka5

Is it possible to package them as npm modules? If so, read the npm install documentation, it can install from a git repository. Another option is git submodules, but there is a big chance to run into dancing with a tambourine.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question