You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

101 lines
3.7 KiB

11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
  1. ---
  2. layout : 'default'
  3. css : 'guide'
  4. title : 'Set-up'
  5. description : 'A guide to developing locally'
  6. type : 'Semantic Project'
  7. ---
  8. <script src="/javascript/intro.js"></script>
  9. <%- @partial('header') %>
  10. <div class="main container">
  11. <div class="peek">
  12. <div class="ui vertical pointing secondary menu">
  13. <a class="active item">Installing Dependencies</a>
  14. <a class="item">Fixing Bugs</a>
  15. </div>
  16. </div>
  17. <h2 class="ui dividing header">Installing Dependencies</h2>
  18. <p>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.</p>
  19. <h3 class="ui header">1. Install Node</h3>
  20. <p>Semantic docs are written in DocPad which requires NodeJS. </p>
  21. <div class="ui warning message">Make sure npm does not require sudo to operate, this might cause permissions issues.</div>
  22. <ul class="ui list">
  23. <li><a href="https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager">Node JS via Package Manager</a></li>
  24. <li><a href="https://gist.github.com/isaacs/579814">Installing Node JS without sudo</a></li>
  25. </ul>
  26. <h3 class="ui header">2. Fork Semantic</h3>
  27. <iframe src="http://ghbtns.com/github-btn.html?user=jlukic&repo=semantic=ui&type=fork&count=true&size=large"
  28. allowtransparency="true" frameborder="0" scrolling="0" width="90" height="30"></iframe>
  29. <h3 class="ui header">3. Install Dependencies</h3>
  30. <p>Running update inside the local directory will grab all packages in <code>package.json</code> in the root of the project.</p>
  31. <div class="code" data-title="Installing dependencies" data-type="terminal">
  32. npm update
  33. </div>
  34. <h3 class="ui header">4. Start Your Server</h3>
  35. <div class="code" data-title="Starting server locally" data-type="terminal">
  36. docpad run
  37. </div>
  38. <p>Docpad should now run an instance of semantic-ui.com locally you can access at <code>http://localhost:9778</code></p>
  39. <h2 class="ui dividing header">Fixing Bugs</h2>
  40. <h3 class="ui header">Watch Script</h3>
  41. <p>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 <code>/src/{type}/{elementname}/</code> 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.</p>
  42. <p>To see exactly what this is doing you can check out our <a href="https://github.com/jlukic/Semantic-UI/blob/master/Gruntfile.js">commented gruntfile</a></p>
  43. <div class="code" data-title="Watching Changes" data-type="terminal">
  44. grunt
  45. </div>
  46. <p>The watch task is the default grunt task for Semantic, so you can start it quite simply.</p>
  47. <h3 class="ui header">Running Tests</h3>
  48. <p>Tests will automatically run with <code>grunt watch</code> if you have started karma</p>
  49. <div class="code" data-title="Execute tests while developing" data-type="terminal">
  50. karma start
  51. grunt watch
  52. </div>
  53. <p>You can also run the test suite manually</p>
  54. <div class="code" data-title="Execute tests while developing" data-type="terminal">
  55. npm test
  56. // or
  57. grunt build
  58. // or
  59. karma run
  60. </div>
  61. <h3 class="ui header">Packaging Elements</h3>
  62. <p>For convenience there is also a separate grunt command for building minified, packaged, and compressed versions of the library.</p>
  63. <div class="code" data-title="Building Release Files" data-type="terminal">
  64. grunt build
  65. </div>
  66. <h3 class="ui header"></h3>
  67. <div class="ui divider"></div>
  68. <a class="ui large right labeled teal icon button" href="/introduction.html">
  69. Next: Library Introduction
  70. <i class="right arrow icon"></i>
  71. </a>
  72. </div>