GithubHelp home page GithubHelp logo

tommyengstrom / purescript-ocelot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from citizennet/purescript-ocelot

0.0 0.0 0.0 10.19 MB

An opinionated component library for Halogen apps

Home Page: https://citizennet.github.io/purescript-ocelot/

License: Apache License 2.0

PureScript 90.26% JavaScript 1.73% CSS 5.87% Dockerfile 0.11% Dhall 0.97% Mustache 0.04% Makefile 1.02%

purescript-ocelot's Introduction

Ocelot CircleCI

Ocelot is an opinionated component library for Halogen-based PureScript applications.

Philosophy

This repository holds the blocks and components we use in CitizenNet applications. These atoms can be built, styled, and rigorously tested without being forced into the context of the application. That allows for faster fixes and iteration in a sandbox environment so we can isolate errors, and more importantly, it allows easy access for business and design teams to verify our components without having to wait for a staging release or build anything locally.

This separation of concerns carries the same benefits as functional programming generally and fits well with using Tailwind (functional CSS) and PureScript. This UI repository focuses on providing self-contained, well-tested design atoms that can be dropped into any Halogen-based application and just as easily be updated or replaced. This allows the consuming application codebases to focus on providing a robust, usable application for users.

There are four relevant parts to this project:

  • src: contains the pre-built components and UI styles we can drop into application screens
  • test: contains snapshot and logic tests for our components
  • css: contains our modified version of Tailwind
  • ui-guide: contains a small PureScript site demonstrating our components and styling so we can visually test implementations
  • dist: contains the built CSS to import into Wildcat, and an index.html file usable for local testing

Use

Preview & Testing

One of the major goals of this project is to provide a minimal environment to test the UI components we build and ensure the behaviors and styling are correct without coupling them to a particular screen in the app. Once the individual units are built and tested, we know we can safely import and use them in the app.

Developing

All you need to do to get started is run:

make

This will install all dependencies and build the project. After making changes you can run the same command to build those changes. To see a list of the potentially useful commands, run:

make help

Publishing

One of the primary aims of this project is to provide a way for non-PureScript developers to view and test our components. That ability is provided by the generated documentation site. This site is automatically built by Circle CI on the gh-pages branch.

Our built CSS is version controlled, so that consuming applications can use it with minimal changes to their build system. Running make before committing will not only validate that you're checking in code that compiles, but that the CSS is up to date. However, if you forget to build before checking in your code, there is a Circle CI step that will validate that the CSS is up to date for you.

Releasing

To create a new release:

  1. Adjust the version in package.json. Some of our dependents rely on this version being correct.
  2. Submit the changes to main via a PR.
  3. Create a tag for the version.
    $ git tag $NEW_VERSION
  4. Push main and the tag to the repo.
    $ git push --tags origin main
  5. Create a release on GitHub for the tag. The description should document the changes in this new version.

purescript-ocelot's People

Contributors

thomashoneyman avatar davezuch avatar boygao1992 avatar foresttoney avatar crcornwell avatar joneshf-cn avatar carolag avatar vanceism7 avatar citizengabe avatar srghma 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.