thlorenz / replpad

Pipes content of files to a node repl whenever they change to enable a highly interactive coding experience.
http://thlorenz.github.com/replpad/
MIT License
213 stars 19 forks source link

Fix a bug in .pack and .packDeps #17

Closed yamadapc closed 9 years ago

yamadapc commented 9 years ago

Calling .pack or .packDeps would throw if used inside a directory with a package with no dependencies (or dev dependencies).

thlorenz commented 9 years ago

Good catch, could you please fix this with less changes to the code? i.e. a minor change would suffice like:

Object.keys(pack.dependencies || {})
  .concat(Object.keys(pack.devDependencies || {}))
  ...

Thanks.

yamadapc commented 9 years ago

Done

yamadapc commented 9 years ago

:) Sorry about that; just thought that maybe calling Object.keys unnecessarily might not be a good practice.

yamadapc commented 9 years ago

Do you want me to add nicer handling of the case? It'll result in more code, but maybe a nicer interface.

thlorenz commented 9 years ago

No, this is fine, will pull soonish.

thlorenz commented 9 years ago

Thanks, published as 0.12.1