Skip to content

MinnPost/minnpost-templates

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MinnPost Templates

A generator for Yeoman.

The templates created from this generator are Grunt, RequireJS, and Bower powered front-end application. Grunt will compile the code into a bit of embeddable HTML that links to CSS and JS files that are uploaded to S3.

There are two main types: application and inline. Applications are meant for full page articles and inlines are more appropriate for embedding within a text filled article.

Getting Started

Prerequsites

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 Yeoman: npm install -g yo

Install generator

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-templats.git
  2. Go into the template directory: cd minnpost-templates
  3. Install NodeJS packages: npm install
  4. Link this code base so Yeoman can see it: npm link

Create an application or inline from a template

  1. Make a Github repository first. If this is an inline piece, you may want to put multiple pieces in one repository. Repository naming:
    • For projects that are very specific to a single story or group of stories: do the following:
      • Use lowercase characters
      • Use hyphens instead of spaces or underscores
      • Prefix the repository with minnpost- or minnpost-inline-.
    • For re-usable libraries, follow naming conventions that are most appropriate given the technologies used (language and distribution system), such as NPM and Node, Python and PIP, etc.
  2. Checkout your new repository with git clone or make a new directory like with mkdir ../minnpost-sweet-new-app.
  3. Go into the new directory: cd ../minnpost-sweet-new-app
  4. Start Yeoman with yo and choose the appropriate template which should end with minnpost-templates.
  5. Answer questions. The template will create the necessary files in your current directory.
  6. Though it should get run automatically for you, you may have to run npm install && bower install manually.

General philosophies

  • Start in the open. This means your first step should be creating a project on Github; you can always move things around later.
  • Assume open; even if a project is started privately, it may one day be out in the open, so make it easier for everyone.
  • Commit often. Large commits are harder to parse and merge.
  • Never commit passwords or sensitive/secure information; use configuration files for this.
  • Code as little as possible; use existing libraries and projects where applicable.
  • Document your process; being open and documenting means that MinnPost can be transparent in how it handles data or interactive projects.
  • Documentation and code commenting is cool; it means you and others can more easily understand a project and the decisions that were made along the way.
  • Use existing standards; utilize existing standards for code, data, or whatever. Making or using custom ways of doing things adds complications and more work for everyone else (though sometimes they are necessary).

Coding standards

Coding standards can seem arbitrary, but are very important when multiple people are working on a project. Deciding on coding standards up front will alleviate a lot of headache down the road.

About

Templates for front-end-based news applications and inline graphics using Yeoman.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published