felixge/node-dateformat

consider moving cli to different lib

jonschlinkert opened this issue · 11 comments

I love using this, but I just realized that it's using meow, and I'm guessing that a good percentage of users like myself probably aren't using the CLI, but the dependency tree for it is absurdly massive. Especially considering this would have zero deps without it.

meow has 48 dependencies in total, this is its flattened dependency tree (along with the number of times each module appears in the tree):

{
  'trim-newlines': 1,
  'redent': 1,
  'strip-indent': 1,
  'get-stdin': 1,
  'indent-string': 1,
  'repeating': 1,
  'is-finite': 1,
  'number-is-nan': 1,
  'read-pkg-up': 1,
  'read-pkg': 1,
  'path-type': 1,
  'pinkie-promise': 4,
  'pinkie': 4,
  'pify': 2,
  'graceful-fs': 2,
  'normalize-package-data': 1,
  'load-json-file': 1,
  'strip-bom': 1,
  'is-utf8': 1,
  'parse-json': 1,
  'error-ex': 1,
  'find-up': 1,
  'path-exists': 1,
  'object-assign': 1,
  'validate-npm-package-license': 1,
  'spdx-expression-parse': 1,
  'spdx-license-ids': 2,
  'spdx-exceptions': 1,
  'spdx-correct': 1,
  'semver': 1,
  'is-builtin-module': 1,
  'builtin-modules': 1,
  'hosted-git-info': 1,
  'minimist': 1,
  'loud-rejection': 1,
  'camelcase-keys': 1,
  'map-obj': 1,
  'camelcase': 1
}

ping, I'd be happy to do a pr to remove this dependency. Unfortunately this shows up every time we install a gulp plugin that uses gulp-util, so it's creating a ton of extra files that aren't needed.

Great idea, also getting a lot of extra files when installing via npm. Perhaps a separate dateformat-cli package depending on this?

I have now published a new npm package "dateformat-light" that removes the CLI, and fixes the AMD inclusion bug

well, I'm a fan of small modules, but that doesn't really solve this issue though, since there are many gulp plugins using gulp-util, and gulp-util uses this lib. The issue will need to be resolved here unfortunately

fwiw, since this library is no longer supported, I'll be using dateformat-light going forward.

@felixge can I please get you to consider removing meow from deps?

@jonschlinkert send a PR and I'll merge it. Ping me in the PR, I don't watch this repo.

Great thanks!

Thanks for working on this @jonschlinkert! Please keep us posted.

no prob, I'll be sending a pr tomorrow (Monday)

Closing as meow is now removed as a dependency