Skip to content
Bryan Jacquot edited this page Aug 8, 2016 · 19 revisions

This Wiki page assumes you have Node installed in your local environment. See Get Started page if you need help installing required dependencies.

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

  1. Install NPM packages and Gulp:
```
$ cd grommet
$ npm install
$ npm install -g gulp
```
  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 Tests

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

$ gulp test

This step will also create the code coverage report under coverage/lcov-report/index.html.

Using local grommet build in your project

To link your locally build grommet in your development application project do the following:

$ cd ./grommet/dist
$ npm link

In your application where you want to use grommet:

$ cd YourApplication
$ npm link grommet

If you build your application now, you might get to the problem that you have loaded two instances of react. To solve this, set resolve alias in your application webpack setting.

resolve: {
  alias: {
    react: path.resolve('./node_modules/react')
  }
},

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