Skip to content

Latest commit

 

History

History
92 lines (58 loc) · 4.71 KB

CONTRIBUTING.md

File metadata and controls

92 lines (58 loc) · 4.71 KB

Guidelines to contribute to nef

We appreciate any contributions to help nef move forward. Note that we have a code of conduct; please, follow it in all your interactions with the project.

How you can help

There are several things you can do to help nef grow:

  • Report bugs and malfunctioning issues: Use the issue template for bugs and provide as much detail as possible to help us find the cause of the problem, reproduce it, and fix it. Please, take your time to go through the list of open issues in order to make sure they are not duplicated.
  • Suggest new features: Use the issue template for feature requests to suggest a new feature or integration in the library. Do not proceed to the implementation of the new feature until it has been discussed in the issue comments. You can also join the Gitter channel for Bow for longer discussions.
  • Implement approved features: After a suggested feature has been discussed and approved, you can get assigned to the corresponding issue and implement it. Contributions need to go through a code review process. Follow the instructions below for pull requests.

Documentation

nef provides a section in its microsite where its documentation is published in the form of tutorial-like articles. If you want to contribute by adding an article here, this is what you need.

Installation

  • Make sure you have last version of nef, Xcode 11 (o newer), CocoaPods, and brew installed in your computer.
  • Clone the repository for nef and go to the cloned folder.
  • Run nef compile --project Documentation.app to set up the project with its dependencies.
  • Open Documentation.app

Adding content

If you pay attention to the project structure, you can see that it has multiple Xcode Playgrounds that mirror the side bar of this page. You can also see that the Playground pages for each section match the pages inside each section on the web.

  • Do you want to add a new section? You just need to add a new Playground and place it in the order you want it to appear on the website.
  • Do you want to add a new page? You just need to add a new page to the corresponding Playground (section).

In order to add documentation, use the standard Markdown format used in Xcode Playgrounds. For reference, you can check it out in the official documentation from Apple.

Compiling documentation

Once you are done, you can check that your document compiles properly by moving to the root directory of the nef project and running the following command:

➜ nef compile --project Documentation.app

If everything is correct, your document should be ready for publication.

Rendering content locally

If you want to check how your documentation will be rendered once it is published, follow the next steps in the root directory.

A. Rendering simple documentation (without API docs)

➜ nef jekyll --project Documentation.app --output docs --main-page Documentation.app/Jekyll/Home.md
  • You can install the dependencies you need with:
➜ bundle install --gemfile docs/Gemfile --path vendor/bundle
  • Once it is done, you can set up a local server with the site by running:
BUNDLE_GEMFILE=./docs/Gemfile bundle exec jekyll serve -s ./docs
  • The site will be available at the URL http://127.0.0.1:4000. Note: syntax highlighting may not render properly if you do not generate the API reference (read B. subsection)

B. Rendering full documentation (including API reference)

➜ brew install sourcekitten
➜ ./scripts/gen-docs.rb
  • You can install the dependencies you need with:
➜ bundle install --gemfile pub-dir/Gemfile --path vendor/bundle
  • Once it is done, you can set up a local server with the site by running:
BUNDLE_GEMFILE=./pub-dir/Gemfile bundle exec jekyll serve -s ./pub-dir

🚨 If you need to regenerate the site after changing nef Playground Documentation, you only need run (and the site will be reloaded):

➜ nef jekyll --project Documentation.app --output pub-dir --main-page Documentation.app/Jekyll/Home.md