Code Monkey home page Code Monkey logo

gelato-ui's Introduction

Gelato UI

React component library and design system powered by Vanilla Extract.

The focus is on extensibility through utility props, and customization through simple but robust themes. And this all backed by Vanilla Extract, which optimizes the CSS output using modern techniques (like CSS custom properties).

This library is in development and not recommended for production use.

Development

This project uses:

  • Nx to manage the monorepo
  • Storybook for visual development
  • Jest for testing (+ React Testing Library for components)
  • Cypress for E2E tests
  • Webpack for bundling apps, libraries, etc

Storybook

  1. Run yarn storybook:start to spin up the Storybook development server.
  2. Your browser should open with: http://localhost:4400/

Generate a library

Run nx g @nrwl/react:lib my-lib to generate a library. These are stored in the /libs/ folder. They can be imported using @gelato-ui/mylib from any other library or app (/apps/).

Generating Components

Creates a <Button> component in libs/components.

nx g @nrwl/react:component button --project=components --export

Then you can generate any missing Storybook tests using:

nx g @nrwl/react:stories --project=components

Creating utilities

Utilites are anything that isn't a component - like pure TS/JS. These are helper functions, data constants, etc.

  1. Create new folder inside library - anywhere is ok: libs/components/src/libs/your-utility/
  2. Add your files.
  3. Make sure to export anything in the root index.ts that needs to be exposed to user via NPM module.

We currently do not having tests auto generated for utilities, but they should be available through the Nx Jest setup.

Generate an application

Run nx g @nrwl/react:app my-app to generate an application.

You can use any of the plugins above to generate applications as well.

When using Nx, you can create multiple applications and libraries in the same workspace.

Development server

Run nx serve my-app for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Build

Run nx build my-app to build the project. The build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.

Running unit tests

Run nx test my-app to execute the unit tests via Jest.

Run nx affected:test to execute the unit tests affected by a change.

Running end-to-end tests

Run ng e2e my-app to execute the end-to-end tests via Cypress.

Run nx affected:e2e to execute the end-to-end tests affected by a change.

Understand your workspace

Run nx dep-graph to see a diagram of the dependencies of your projects.

Further help

Visit the Nx Documentation to learn more.

gelato-ui's People

Contributors

whoisryosuke avatar

Stargazers

Daniel Sousa avatar  avatar Elton Fernandes avatar RendarCB avatar Claudiu Cojocaru avatar Sanjib Kumar Sah avatar Christoph Lindstädt avatar Dok6n avatar Batuhan Göksu avatar  avatar s1cs avatar Leandro Oliveira avatar Alex Whiteside avatar easeurmind avatar Sergey Murawsky avatar Maftun Hashimli avatar Andrejs Agejevs avatar Bùi Xuân Hải avatar Danilo Vaz avatar naime-hossain avatar  avatar Eduardo Rabelo avatar Andrew Moss avatar Olivier Tassinari avatar Ricardo Valero de la Rosa avatar Gabe G'Sell avatar Takashi Kiyota avatar Kinane avatar Spectrum avatar  avatar Lee avatar Yotaro Tsukada avatar Harijs Veveris avatar Quintin Orsmond avatar Ygor Luiz avatar Jamie robertson avatar oussama djaidri avatar Subhan Bakhtiyarov avatar Kelechi Odom avatar abjutus avatar tsingson avatar Adam Bulmer avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.