Skip to content

JonathonMA/npm-install-submodule-behaviour

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Investigation of npm install behaviour

Having submodules in the same repo as a parent application seems like a great idea, and using file:<module-path> in the top-level dependencies section supports this. However, we experience an "unflattening" of modules after we install an individual module by name.

Sample run

node version: v4.2.1
npm version: 3.3.12
 _______________________________
< First: do a plain npm install >
 -------------------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
npm-install-submodule-behaviour@0.0.1 /Users/jonathona/Code/npm-install-submodule-behaviour
β”œβ”€β”¬ react@0.14.2
β”‚ β”œβ”€β”¬ envify@3.4.0
β”‚ β”‚ β”œβ”€β”¬ jstransform@10.1.0
β”‚ β”‚ β”‚ β”œβ”€β”€ base62@0.1.1
β”‚ β”‚ β”‚ β”œβ”€β”€ esprima-fb@13001.1001.0-dev-harmony-fb
β”‚ β”‚ β”‚ └─┬ source-map@0.1.31
β”‚ β”‚ β”‚   └── amdefine@1.0.0
β”‚ β”‚ └── through@2.3.8
β”‚ └─┬ fbjs@0.3.2
β”‚   β”œβ”€β”€ core-js@1.2.6
β”‚   β”œβ”€β”¬ loose-envify@1.1.0
β”‚   β”‚ └── js-tokens@1.0.2
β”‚   β”œβ”€β”¬ promise@7.0.4
β”‚   β”‚ └── asap@2.0.3
β”‚   β”œβ”€β”€ ua-parser-js@0.7.9
β”‚   └── whatwg-fetch@0.9.0
β”œβ”€β”€ submodule1@0.0.1
└── submodule2@0.0.1

 ________________
< React Count: 1 >
 ----------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
 ___________________________________
< Second: install submodule by name >
 -----------------------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
react@0.14.2 node_modules/react -> node_modules/submodule1/node_modules/react
npm-install-submodule-behaviour@0.0.1 /Users/jonathona/Code/npm-install-submodule-behaviour
β”œβ”€β”¬ submodule1@0.0.1
β”‚ └── react@0.14.2
└─┬ submodule2@0.0.1
  └── react@0.14.2

 ________________
< React Count: 2 >
 ----------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
 ___________________________________
/ Finish up with: another plain npm \
\ install                           /
 -----------------------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
npm-install-submodule-behaviour@0.0.1 /Users/jonathona/Code/npm-install-submodule-behaviour
β”œβ”€β”€ react@0.14.2
β”œβ”€β”¬ submodule1@0.0.1
β”‚ └── react@0.14.2
└─┬ submodule2@0.0.1
  └── react@0.14.2

 ________________
< React Count: 3 >
 ----------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages