This page will provide you with recommendations for creating a modular application using Grommet.
In this exercise you will use the NPM version of Grommet. The Get Started page provides instructions on installing Grommet with NPM.
As your application grows, you will likely feel the need to divide your code into smaller modules. Dividing your code into modules is a common strategy for large-scale projects as it helps with parallel development and debugging. As a result, we recommend you structure your Grommet application as follows:
{"/sample-app\n /src\n /js\n /actions\n /constants\n /components\n /stores\n index.js\n /scss\n index.html\n gulpfile.js\n package.json\n"}
If you use the grommet
command, it will generate your project following the recommended structure. Grommet also includes a set of Gulp tasks that are intended to enable a highly productive developer experience and creation of production-ready apps.
These Gulp tasks are available for you to run in the root folder of your application.
dist
folder. The content will be ready to deploy in an application server of your choice.src/js
.src/scss
.
sync
option is provided in the gulpfile.js. The sync object schema follows:
{"sync: {\n hostname: 'fullly.qualified.domain.name',\n username: 'username',\n remoteDestination: '/absolute/path/on/remote/host'\n}"}