Static portfolio website & blog template http://jfroom.github.io/portfolio-web
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.
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
- [Video.js]13
- [Plato Reporter]14
If you'd like to see the functional end product, the demo site is at http://jfroom.github.io/portfolio-web. Those final static production files, can be found on gh-pages
branch.
This codebase requires Node >=4.0
, NPM >=3
, and Grunt ~1.0
.
If you haven't used [Node]15 and [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.
Run npm install
in the project folder to install all node dependencies. All bower components are currently part of this repo. (There is some debate on best practices with this - more reading by this SO thread for NPM and [Addy Osmani for Bower components]18.)
node-spritesheet
requires ImageMagick be installed.
These build tasks are derived from [Yeoman]11's [WebApp]19 generator (on older grunt version, they've now moved over to gulp!) 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.
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.
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.
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, S3_PORTFOLIO_USER, PATH_BLOB.
These values can also be overwritten by any environment variables, this is how secret values such as S3 or 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.
This repository contains generic demo data for the projects section.
The PATH_PORTFOLIO_DATA
settings/environment 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.
grunt test:unit
Runs the Karma Runner tests localed in test/unit
folder.
For configuration options, see tasks/test_task.js and tasks/options/karma.js.
The integration tests use [Protractor]7 and [Selenium's WebDriver][^seleniumwebdriver] API for browser automation. You can see these instructions on how to get Selenium & Protractor installed locally on your system. Here's a quick list of how to get this working (which worked as of this writing).
-
npm install -g [email protected]
-
webdriver-manager update
-
Have latest verison of FireFox installed.
-
grunt serve
(orgrunt serve:prod
). -
In a new terminal,
grunt test:e2e
to run the protractor/jasmine tests located in test/e2e.
- Remove compiled css from repo. Should be compiled only into served temp dir and prod dist dir.
- In the past
grunt-protractor-runner
was installed to leverage grunt to launch the tests. But there's some type of version conflict in that repo that needs to be resolved. So for now we need to have protractor globally installed and run locally withgrunt-shell
. - Integrate protractor into travis after protractor-runner working again
- Re-integrate [SauceLabs][^sauce] support
Copyright © JFMK, LLC Released under the [MIT License]20.