IanMHoffman / IO-Portfolio

Playing with github pages

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

portfolio-web Build Status Built with Grunt

 

##Overview Static portfolio website template http://jfroom.github.io/portfolio-web

###Intent This project is used to generate my portfolio site and blog. It's a loose framework stubbed out with generic data. Via the settings and data files, meaningful content can be loaded in. The project has been open sourced for academic and sharing purposes. Fork it if you want to, but it not closely maintained.

###Technologies The project leverages:

  • [GruntJS]1
  • [Assemble]2 with [Handlebars]3
  • [Angular]4
  • [Coffeescript]5
  • [Karma Runner]6
  • [Protractor]7
  • [Bootstrap]8
  • [Sass]9
  • [Bower]10
  • [Yeoman]11
  • [Travis]12
  • [SauceLabs]13
  • [Plato Reporter]14

Getting Started

This website requires Node/NPM ~0.10.31, and Grunt ~0.4.5

If you haven't used [Node]15 or [NPM]16 before, be sure to check out the linked documentation.

If you haven't used [grunt]1 before, be sure to check out the [Getting Started]17 guide.

###Dependencies

I have added all bower_components and node_module dependencies directly to the repository so that this project will be more self contained for deployment purposes. This is a best practice outlined by [Mikeal Rogers for NPM modules]18 and [Addy Osmani for Bower components]19.

node-spritesheet requires ImageMagick be installed.

##Build

These build tasks are derived from [Yeoman]11's [WebApp]20 generator and a handful of other tools in the grunt ecosystem.

####Development

grunt dev Create the development build.

grunt serve Create the development build, start a local webserver, serve it with live reload and watch for file changes for a refresh.

grunt images Create the spritesheets. grunt dev and grunt prod will passively create the output sprites if they do not exist, but currently if you want to include new sprites or alter existing ones, you'll need to do a foced new build by running this command.

####Production

grunt prod Create a deployable build in the dist folder.

grunt serve:prod Create a deployable build, start a local webserver and serve it with live reload.

####Deploy

grunt upload Compile the production build and push the results to Amazon's S3 storage based on configuration settings.

grunt gh-pages-upload Do production build, upload to github pages.

##Project Settings

In settings.json are configuration variables that will be merged back into node's globally accessible process.env object. Example variables include: SERVER_HOSTNAME, SERVER_PORT, SAUCE_USERNAME, SAUCE_KEY, S3_PORTFOLIO_USER, PATH_BLOB.

These values can also be overwritten by any environment variables, this is how secret values such as S3 or Sauce credentials get passed in. To learn more about configuring environment variables for your OS, reference google search.

In a shell, an alternate settings file can be loaded: PATH_PORTFOLIO_SETTINGS=~/sites/private/settings.json grunt serve. This is how I can use the same codebase to develop the generic framework and my personal portfolio and blog.

##Test ###Units grunt test:unit Runs the Karma Runner tests localed in test/unit folder.

For configuration options, see tasks/test_task.js, tasks/options/karma.js, test/karma-unit.conf.js.

###Integration/E2E The integration tests use [Protractor]7 and [Selenium's WebDriver]21 API for browser automation.

  1. See these instructions on [how to get Selenium server installed]22 on your system.

  2. Start the server webdriver-manager start in a separate terminal process.

  3. Start the served version (either the development or production builds) of the project in a separate terminal process.

  4. grunt test:e2e runs the protractor/jasmine tests located in test/e2e.

grunt test runs both unit and integration tests.

####Configuration For configuration options, target browsers and [SauceLabs]13 connections, see tasks/test_task.js, tasks/options/protractor.js, test/protractor-e2e.conf.js.

##Demo Data This repository contains vanilla demo data for the projects section. The PATH_PORTFOLIO_DATA settings/enviornment variables provide a way to pass in data from an alternate location. This is how I'm able to store the project data in a private repository.

##License Copyright (c) 2013-2014 JFMK, LLC. Released under the [MIT License]23.

Footnotes

  1. http://gruntjs.com/ 2

  2. http://assemble.io/

  3. http://handlebarsjs.com/

  4. http://angularjs.org/

  5. http://coffeescript.org/

  6. http://karma-runner.github.io/

  7. https://github.com/angular/protractor 2

  8. http://getbooktstrap/

  9. http://sass-lang.com/

  10. http://bower.io/

  11. http://yeoman.io/ 2

  12. https://travis-ci.org/

  13. https://saucelabs.com/ 2

  14. https://github.com/es-analysis/plato

  15. http://nodejs.org

  16. https://npmjs.org/

  17. http://gruntjs.com/

  18. http://www.futurealoof.com/posts/nodemodules-in-git.html

  19. http://addyosmani.com/blog/checking-in-front-end-dependencies/

  20. https://github.com/yeoman/generator-webapp

  21. http://www.seleniumhq.org/projects/webdriver/

  22. https://github.com/angular/protractor#appendix-a-setting-up-a-standalone-selenium-server

  23. https://github.com/jfroom/portfolio-web/blob/master/LICENSE

About

Playing with github pages

License:MIT License


Languages

Language:CSS 55.2%Language:HTML 25.7%Language:CoffeeScript 11.4%Language:JavaScript 7.7%