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.

108 lines
4.4 KiB

  1. ---
  2. layout : 'default'
  3. css : 'build'
  4. title : 'Development'
  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">Running Locally</a>
  14. <a class="item">Fixing Bugs</a>
  15. <a class="item">The Future</a>
  16. </div>
  17. </div>
  18. <h2 class="ui dividing header">Running Locally</h2>
  19. <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>
  20. <h3 class="ui header">1) Install Node</h3>
  21. <p>Semantic docs are written in DocPad which requires NodeJS. </p>
  22. <div class="ui warning message">Make sure npm does not require sudo to operate, this might cause permissions issues.</div>
  23. <ul class="ui list">
  24. <li><a href="https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager">Node JS via Package Manager</a></li>
  25. <li><a href="https://gist.github.com/isaacs/579814">Installing Node JS without sudo</a></li>
  26. </ul>
  27. <h3 class="ui header">2) Install Dependencies</h3>
  28. <div class="code" data-title="Installing DocPad" data-type="terminal">
  29. // docpad is used to generate static sites like semantic docs
  30. npm install -g docpad
  31. </div>
  32. <div class="code" data-title="Installing Grunt" data-type="terminal">
  33. // eco is used for templating inside documentation
  34. docpad install eco
  35. </div>
  36. <div class="code" data-title="Installing Grunt" data-type="terminal">
  37. // grunt is used to automated tasks like concatenating and minifying files
  38. npm install -g grunt-cli
  39. </div>
  40. <h3 class="ui header">3) Fork Semantic</h3>
  41. <iframe src="http://ghbtns.com/github-btn.html?user=jlukic&repo=semantic=ui&type=fork&count=true&size=large"
  42. allowtransparency="true" frameborder="0" scrolling="0" width="90" height="30"></iframe>
  43. <h3 class="ui header">4) Start Your Server</h3>
  44. <p>It's important to note that all server code exists inside of <code>/node</code> in the project. So all commands should be run relative to that directory.</p>
  45. <div class="code" data-title="Starting server locally" data-type="terminal">
  46. cd node
  47. docpad run
  48. </div>
  49. <p>Docpad should now run an instance of semantic-ui.com locally you can access at <code>http://localhost:9778</code></p>
  50. <h2 class="ui dividing header">Fixing Bugs</h2>
  51. <h3 class="ui header">Watch Script</h3>
  52. <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>
  53. <p>To see exactly what this is doing you can check out our <a href="https://github.com/jlukic/Semantic-UI/blob/master/node/Gruntfile.js">commented gruntfile</a></p>
  54. <div class="code" data-title="Watching Changes" data-type="terminal">
  55. grunt
  56. </div>
  57. <p>The watch task is the default grunt task for Semantic, so you can start it quite simply.</p>
  58. <h3 class="ui header">Packaging Elements</h3>
  59. <p>For convenience there is also a separate grunt command for building minified, packaged, and compressed versions of the library.</p>
  60. <div class="code" data-title="Building Release Files" data-type="terminal">
  61. grunt build
  62. </div>
  63. <h2 class="ui dividing header">The Future</h2>
  64. <h3 class="ui header">UI Dev Kits</h3>
  65. <p>We are working to create development kits for writing and distributing third party UI definitions. These, are planned to land after our 1.0 release and allow other developers to contribute ui components or reskins of existing components.</p>
  66. <p>For more information on the development of the UI specification for third party components, please visit our community discussion boards on Trello</p>
  67. <h4 class="ui header">Development Boards</h4>
  68. <div class="ui buttons">
  69. <a class="ui button" href="https://trello.com/b/FZvMsVIM">Public</a>
  70. <a class="ui button" href="https://trello.com/b/eOoZwNBQ">Contributor</a>
  71. </div>
  72. <h3 class="ui header"></h3>
  73. <div class="ui divider"></div>
  74. <a class="ui large right labeled teal icon button" href="/introduction.html">
  75. Next: Library Introduction
  76. <i class="right arrow icon"></i>
  77. </a>
  78. </div>