package.json

10 views
Skip to first unread message

fugee ohu

unread,
Mar 18, 2018, 4:41:00 PM3/18/18
to Ruby on Rails: Talk
Why do I need this file and why do I need to install jquery packages with yarn or npm

Colin Law

unread,
Mar 18, 2018, 5:53:01 PM3/18/18
to Ruby on Rails: Talk
On 18 March 2018 at 20:41, fugee ohu <fuge...@gmail.com> wrote:
> Why do I need this file and why do I need to install jquery packages with
> yarn or npm

I don't think you do. I may be wrong though.

Colin

Robby O'Connor

unread,
Mar 18, 2018, 11:51:38 PM3/18/18
to rubyonra...@googlegroups.com, Colin Law
fugee,

I will answer your question in the last paragraph but wanted to say
something:

I've been following your posts and a lot of your questions can be
answered with really simple Google searches...that skill is a far more
valuable skill...it means you can learn new things and get up to speed
quickly and independently. Rather than running to this list every time
you hit an issue, try to do basic google searches first...if you fail to
find the answer (you likely won't) -- THEN ask here.

Anyways -- the answer is that a package.json file exists for npm to
handle dependencies...you might need them if your asset pipeline uses
something like webpack (it really should)...
signature.asc

Robby O'Connor

unread,
Mar 19, 2018, 12:00:15 AM3/19/18
to rubyonra...@googlegroups.com, Colin Law
Also, to add on:

The reason you'd install jquery this way is that you don't have to track
it in git -- so the source tree becomes less cluttered...it's a much
cleaner way to handle assets. Bower was kinda-sorta deprecated in favor
of using yarn. Yarn is super nice to work with and has some caching
built-in.


--rob
signature.asc
Reply all
Reply to author
Forward
0 new messages