--- layout : 'default' css : 'guide' title : 'Set-up' description : 'A guide to developing locally' type : 'Semantic Project' --- <%- @partial('header') %>

Installing Dependencies

It may be useful to run the development docs locally when working on a forked version of semantic, as the docs themselves help in testing out changes to ui components.

1. Install Node

Semantic docs are written in DocPad which requires NodeJS.

Make sure npm does not require sudo to operate, this might cause permissions issues.

2. Fork Semantic

3. Install Dependencies

Running update inside the local directory will grab all packages in package.json in the root of the project.

npm update

4. Start Your Server

docpad run

Docpad should now run an instance of semantic-ui.com locally you can access at http://localhost:9778

Fixing Bugs

Watch Script

If you are working on fixing a UI component that is part of Semantic, your best bet is to work actively on the file in /src/{type}/{elementname}/ while running a watch script from grunt. This will rebuild the docs after you make changes, so you can see if you have corrected the issue you are fixing.

To see exactly what this is doing you can check out our commented gruntfile

grunt

The watch task is the default grunt task for Semantic, so you can start it quite simply.

Running Tests

Tests will automatically run with grunt watch if you have started karma

karma start grunt watch

You can also run the test suite manually

npm test // or grunt build // or karma run

Packaging Elements

For convenience there is also a separate grunt command for building minified, packaged, and compressed versions of the library.

grunt build

Next: Library Introduction