3

I'm trying to discover best practices for building a library and looking through famous library code. I looked at lodash and saw that the build scripts all reference a lib directory that doesn't exist. If I clone this repository, how can it build if these files don't exist in the repository?

punkrockbuddyholly
  • 9,675
  • 7
  • 36
  • 69
  • I checked the link because I thought the answer might be obvious, but it doesn't even seem to be available when downloading via `npm`: https://unpkg.com/lodash@4.17.4/lib/main/build-dist.js – Patrick Roberts Sep 27 '17 at 06:17
  • I was initially curious because it said the "main" file was lodash.js but this didn't exist. "Fair enough", I thought. Maybe it is created in the build script. "WTF", I thought. – punkrockbuddyholly Sep 27 '17 at 06:19
  • 1
    Perhaps [this warning](https://github.com/lodash/lodash/blob/master/.github/CONTRIBUTING.md#construction-notice-construction) is relevant? Also, [`lodash.js`](https://unpkg.com/lodash@4.17.4/lodash.js) _does_ exist when downloading via `npm`, FYI. – Patrick Roberts Sep 27 '17 at 06:19

1 Answers1

1

We used to use lodash-cli to modularize and bundle individual method packages. However, in v5 we'll stick to a single modular package.

Reference

Medet Tleukabiluly
  • 11,662
  • 3
  • 34
  • 69