-
Notifications
You must be signed in to change notification settings - Fork 0
Building Grommet
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:
- Install NPM packages and Gulp:
```
$ cd grommet
$ npm install
$ npm install -g gulp
```
- Create the NPM distribution:
```
$ gulp dist
```
This step will create the **dist** folder with content ready to be deployed in NPM.
- 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.
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.
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')
}
},
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.