Git Product home page Git Product logo

pattern-lab's Introduction

New York Public Radio Design System

Installation

Prerequisites:

Installing development dependencies

In the docroot run:

npm run build

This will create the node_modules directory and download all dev dependencies, setup & build the Pattern Lab environment, compile all SCSS into CSS, then move the generated CSS into the /public site.

Developing and styling patterns

When working with the theme, there's a few development options available. These commands must be run from the docroot.

Watch for file changes

This will start up a local server via Browsersync. It proxies the local domain nypr.test.

gulp

Generating theme-specific CSS files

gulp sass

Rebuild Pattern Lab

gulp patterns-change

Generating theme asset files

gulp build-theme

This will generate all CSS files, compile a new Pattern Lab public site, and move the generated CSS into the new public site. You might use this after you pull in some theme changes and want to view them on your local environment.

For a larger list of gulp commands, see the gulp file

Local Pattern Lab development server settings

  • Host name: nypr.test. (this is what Browsersync uses to proxy the localhost server)

Deployments

We use circleci to handle automated deployments. The configuration is in the circle.yml file. At a high level, whenever a commit is made to master, the public site is built and the resulting /public/css/themes/default/default.css file is shipped to the gothamist-web-client's DEMO static asset S3 bucket. To deploy to the PROD bucket, simply make a new github release (we follow semantic versioning) and the automated workflow will trigger.

This works by using the gulp ship-sass task (See the code here).

Making commits to branches will trigger the build step of the automated deployment, but not the deploy step. This allows you to see if your changes compile and build properly before merging to master.

pattern-lab's People

Contributors

dparrington avatar kimlarocca avatar ksuitor avatar laurangalbraith avatar ncastro-nypr avatar tpitre avatar walsh9 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.