cul-it / mann-wagon

-- DEPRECATED! -- Wagon site for mannlib.cornell.edu on LocomotiveCMS
1 stars 4 forks source link
locomotivecms mannlibrary

DEPRECATED!

As of 2021-04-01, the Mann website has migrated to Wordpress.

mann-wagon

Locomotive site for Mann Library

Overview

Wagon is the command line interface for Locomotive and is where developers will spend most of their time when working locally on a Locomotive site. For a more thorough intro to the Locomotive approach and workflow, please review the mann-locomotive README. We'll be here when you get back.

Prerequisites

QuickStart

Local Dev
  1. Clone this repo

    $ git clone git@github.com:cul-it/mann-wagon.git
  2. Install gems

    $ cd <clone>
    $ bundle install
  3. Install modules

    $ yarn
  4. Serve the site

    proxied through Browsersync for live-reload goodness -- watching SCSS, JS, templates

    $ yarn start
  5. Visit the Mann website at http://localhost:3000

    default browser should automatically launch and request this URL thanks to Browsersync

Syncing/Deploying

We'll be using the sample development environment in this example.

See official Locomotive documentation for a guide to installing engine and more details on available options for sync and deploy commands.

Configure environments in config/deploy.yml
  1. Copy the example configuration

    $ cp config/deploy.yml.example config/deploy.yml
  2. Edit host, handle, email and api_key as applicable for your development environment

Sync from a remote Engine
$ bundle exec wagon sync development -v
Deploy to a remote Engine

IMPORTANT! Be sure to optimize assets prior to deploying

$ yarn build
$ bundle exec wagon deploy development -v

Deploy to Production

  1. Copy the example configuration

    $ cp config/deploy.yml.example config/deploy.yml
  2. Log in to Locomotive admin interface (https://admin.mannlib.cornell.edu), navigate to the Developers menu option, and copy the Production block that contains the host, handle, email and api_key

  3. Paste the Production block into your config/deploy.yml

IMPORTANT! Be sure to optimize assets prior to deploying

$ yarn build
  1. To deploy changes to Production environment, run
    $ bundle exec wagon deploy production

Linting

Via Javascript Standard Style and sass-lint

$ yarn lint

Or lint JS and Sass separately:

 $ yarn lint-js
 $ yarn lint-sass