dvdzkwsk / react-redux-starter-kit

Get started with React, Redux, and React-Router.
MIT License
10.29k stars 2.2k forks source link

Using Semantic UI #641

Closed kennym closed 8 years ago

kennym commented 8 years ago

How would one use Semantic UI with the starter kit?

This is what I tried:

npm install semantic-ui --save
cd semantic/
gulp build

I then try to reference the files in the src/index.html like this: <link rel="stylesheet" href="../semantic/dist/semantic.css" but that doesn't work

Any ideas on what I am doing wrong?

beeftornado commented 8 years ago

I successfully use semantic-ui in my project that was started from the starter kit. I admit, it took some trial and error to get it right. Your installation steps are good, and you built it -- good. It takes a little bit of hacking to get it served though without bombarding webpack with a crap load of unnecessary files. Since semantic ui is supposedly built with just the stuff you need (you can specify those in your semantic.json file), it shouldn't need any processing so it can be left out of webpack's business (mostly).

So, what you're probably missing...

Now, it should be working in development. There's a few more steps I highly recommend though:

Again, this is just how I got it working. It's by no means the solution since it is obviously very opinionated in what I did. I very much agree though that it was not a simple html include. I mean you could, but then the initial webpack build would take like 5 minutes.

One more unrelated, but helpful tip if you're using semantic. I would highly recommend using the classnames module for applying css styles. Importing individual class names like in the examples is tiresome with this library. And a lot of the dynamic stuff stops working.

rsilvestre commented 8 years ago

Hi, i successfully integrate it too in the project : https://github.com/rsilvestre/react-redux-starter-kit/tree/semantic-ui

Thank you @beeftornado

dvdzkwsk commented 8 years ago

Will add a recipe for this. Also see: https://github.com/TechnologyAdvice/stardust