New Discussion

Notifications

You’re not receiving notifications from this thread.

How do I install UIKit via yarn?

0
CSS

Answer:

  1. Add uikit through yarn: yarn add uikit
  2. Create a file to be transpiled by webpacker: app/javascript/uikit.sass (or app.sass... whichever name suits you best.)
  3. Within uikit.sass import your newly added UIKit library: @import '~uikit/dist/css/uikit'
  4. In the head of your app/views/layouts/application.html.erb add <%= stylesheet_pack_tag 'uikit' %>.
  5. Run rails s in one terminal window tab and ./bin/webpack-dev-server in the other so webpacker can compile your assets and serve them in your app.
Join the discussion
Create an account Log in

Learning Ruby on Rails? Join our newsletter.

We won't send you spam. Unsubscribe at any time.