mrjoelkemp on master
Fix package name to not conflict 3.7.4 (compare)
mrjoelkemp on v3.7.4
mrjoelkemp on master
3.7.3 (compare)
mrjoelkemp on v3.7.3
mrjoelkemp on master
Fix package name to lowercase (compare)
mrjoelkemp on master
3.7.2 (compare)
mrjoelkemp on v3.7.2
mrjoelkemp on bump
mrjoelkemp on bump
Use node-prune (compare)
mrjoelkemp on master
3.7.1 (compare)
mrjoelkemp on v3.7.1
$ which node
/home/tvba5179/Documents/Build/git/public/nvm/versions/node/v6.9.2/bin/node
Hi, Joel, nice to e-meet you.
I want to add a new feature to all of your dependents repos.
It is kind of a tree shaking, but not exactly.
Let's say I have the following file structure
src/myFile.js
src/utils/isString.js
src/utils/isBoolean.js
src/utils/index.js
The index in the utils folder is only import everything from the utils folder and just export it.
So in myFile.js i can do something like:
import { isString } from './utils';
(without referring to the actual file, in this case isString.js)
This will create a dependency tree like this:
myFile.js -> index.js -> (isString.js, isBoolean.js)
but actually, myFile is not importing anything from isBoolean so it's not a real dependency.
This pattern is very popular, and the index files may contain a lot of dependencies which make my dependencies trees looks very ugly and verbose (and also creates circular trees sometimes).
What I want to do, is walk through the index.js file to the real dependency and add the real dependency only.
This can be done in theory by identifying that the index file is only import and export stuff (without any real logic/change to them).
along with the analyzing of the specific object I imported.
What do you think will be the best way to implement this within your packages?
Thanks a lot,
Gilad.