Skip to content

MinnPost/minnpost-styles

Repository files navigation

MinnPost Styles

The MinnPost super-fly style guide, specifically focused on interactive and news applications made by the MinnData team.

This repository should serve as both a code repository to be included in projects as well as a web page for reference and demo purposes.

The demo is publically viewable at code.minnpost.com/minnpost-styles.

Usage

Install with bower install minnpost-styles. See the main demo page for library use.

Note that all styles are within the .minnpost-styles prefix, as our projects are usually embedded in an existing site.

Development

Prerequisites

All commands are assumed to on the command line, often called the Terminal, unless otherwise noted. The following will install technologies needed for the other steps and will only needed to be run once on your computer so there is a good chance you already have these technologies on your computer.

  1. Install Git.
    • On a Mac, install Homebrew, then do: brew install git
  2. Install NodeJS.
    • On a Mac, do: brew install node
  3. Install Grunt: npm install -g grunt-cli
  4. Install Bower: npm install -g bower
  5. Install Ruby, though it is probably already installed on your system.
  6. Install Bundler: gem install bundler

Get code and install packages

Get the code for this project and install the necessary dependency libraries and packages.

  1. Check out this code with Git: git clone https://github.com/MinnPost/minnpost-styles.git
  2. Go into the project directory: cd minnpost-styles
  3. Install NodeJS packages: npm install
  4. Install Bower components: bower install
  5. Install Ruby gems: 'bundle install'
    • On a Mac you will probably have to do: sudo bundle install

Running

  1. Run: grunt server
    • This will run a local webserver for development and you can view the application in your web browser at http://localhost:8833.
    • The server runs grunt watch which will rebuild the applicaiton when files have been modified.

Build

To build or compile all the assets together and create a new version in the dist/ folder.

  1. Update verson in bower.json
  2. Update verson in package.json
  3. Run: grunt
  4. Commit changes and push up to Github, including the gh-pages branch

MinnPost Deploy

For our own purposes, there are some versions up on S3. It is not suggested to use these as S3 is not a CDN. What is in the dist folder will be found in the following folder:

https://s3.amazonaws.com/data.minnpost/projects/minnpost-styles/X.X.X/

For instance:

https://s3.amazonaws.com/data.minnpost/projects/minnpost-styles/0.0.2/minnpost-styles.min.css

The Grunt process has a method to upload this to S3: grunt deploy

Inspiration and 3rd Party Code

Some code and inspiration taken from other, awesome libraries.