Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
ggregoire
on Sept 14, 2018
|
parent
|
context
|
favorite
| on:
You Don't Need Moment.js
But react-dates has moment as dependency, so…
BigJono
on Sept 14, 2018
|
next
[–]
Welcome to the wonderful world of code re-use. Hey, at least we're not re-inventing the wheel.
nkozyra
on Sept 15, 2018
|
parent
|
next
[–]
We're reimporting the wheel (which, by the way, also has moment.js as a dependency)
pnevares
on Sept 15, 2018
|
prev
[–]
https://github.com/airbnb/react-dates/blob/master/package.js...
A devDependency is not the same as a dependency.
scottlecrab
on Sept 15, 2018
|
parent
[–]
It's a dev dependency because they use it in unit tests but it's also a peer dependency, meaning that if you want to use the library you need to include moment.
pnevares
on Sept 17, 2018
|
root
|
parent
[–]
That's my error, thanks for the correction.
Consider applying for YC's W25 batch! Applications are open till Nov 12.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: