Skip to content
Alan Souza edited this page May 13, 2015 · 19 revisions

To build Grommet in your local environment, execute the following commands:

  1. Install Ruby. (version 1.9.3+ required)

  2. Install the Ruby scss-lint package:

```
$ gem install scss_lint
```
  1. Clone Grommet repo:
```
$ git clone https://github.com/HewlettPackard/grommet.git
```
  1. Install NPM packages:
```
$ cd grommet
$ npm install
```
  1. Create the NPM distribution:
```
$ gulp dist
```

This step will create the **dist** folder with content ready to be deployed in NPM.
  1. Create the Bower distribution:
```
$ gulp dist-bower
```

This step will create the **dist-bower** folder with content ready to be used or deployed in Bower. 

Running Grommet Website

To run the Grommet website locally, execute the following commands:

  1. Inside your local Grommet directory, access the docs folder:
```
$ cd docs
```
  1. Run the website using Hot Module Replacement:
```
$ gulp dev
```

This will start a development server with generic Grommet styling, if you want to use the HPE style, run the following command instead:

```
$ gulp dev-hpe
```
  1. Open Grommet Website
At this point, any modification in the website will trigger automatic reload in the browser so that you can easily validate your changes. This is very handy, isn't it?
  1. Build the website for distribution:
```
$ gulp dist
```

This step will create a **docs/dist** folder with the content ready to be deployed in an application server of your choice.

Running Grommet Tests

Tests are located in the test folder. You can execute them by running the following command:

$ gulp test

This step will create a code coverage report under test/coverage.html.

Contributing

The Grommet team is looking forward to your contributions. If you are interested in contributing while getting comfortable with the platform, consider adding to the unit test library. We believe a good way to learn a new framework is by writing tests for it.

Clone this wiki locally