diff --git a/.bowerrc b/.bowerrc
index e751899..5e4a746 100644
--- a/.bowerrc
+++ b/.bowerrc
@@ -1,4 +1,4 @@
{
- "directory": "vendor/bower"
+ "directory": "bower_components"
}
diff --git a/.gitignore b/.gitignore
index ff807f3..3acbeb4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
/node_modules/
-/vendor/bower/
+/bower_components/
/dist/
/test/coverage/
diff --git a/Gruntfile.coffee b/Gruntfile.coffee
new file mode 100644
index 0000000..846112d
--- /dev/null
+++ b/Gruntfile.coffee
@@ -0,0 +1,22 @@
+module.exports = ->
+
+ # Load task configurations.
+ @loadTasks "build/tasks"
+
+ # Run JSHint and a quick test.
+ @registerTask "test", [
+ "jshint"
+ "karma:run"
+ ]
+
+ # When running the default Grunt command, just lint the code.
+ @registerTask "default", [
+ "clean"
+ "jshint"
+ "karma:run"
+ "processhtml"
+ "copy"
+ "requirejs"
+ "styles"
+ "cssmin"
+ ]
diff --git a/Gruntfile.js b/Gruntfile.js
deleted file mode 100644
index 7e2353e..0000000
--- a/Gruntfile.js
+++ /dev/null
@@ -1,226 +0,0 @@
-module.exports = function(grunt) {
- "use strict";
-
- grunt.initConfig({
- // Wipe out previous builds and test reporting.
- clean: ["dist/", "test/reports"],
-
- // Run your source code through JSHint's defaults.
- jshint: ["app/**/*.js"],
-
- // This task uses James Burke's excellent r.js AMD builder to take all
- // modules and concatenate them into a single file.
- requirejs: {
- release: {
- options: {
- mainConfigFile: "app/config.js",
- generateSourceMaps: true,
- include: ["main"],
- insertRequire: ["main"],
- out: "dist/source.min.js",
- optimize: "uglify2",
-
- // Since we bootstrap with nested `require` calls this option allows
- // R.js to find them.
- findNestedDependencies: true,
-
- // Include a minimal AMD implementation shim.
- name: "almond",
-
- // Setting the base url to the distribution directory allows the
- // Uglify minification process to correctly map paths for Source
- // Maps.
- baseUrl: "dist/app",
-
- // Wrap everything in an IIFE.
- wrap: true,
-
- // Do not preserve any license comments when working with source
- // maps. These options are incompatible.
- preserveLicenseComments: false
- }
- }
- },
-
- // This task simplifies working with CSS inside Backbone Boilerplate
- // projects. Instead of manually specifying your stylesheets inside the
- // HTML, you can use `@imports` and this task will concatenate only those
- // paths.
- styles: {
- // Out the concatenated contents of the following styles into the below
- // development file path.
- "dist/styles.css": {
- // Point this to where your `index.css` file is location.
- src: "app/styles/index.css",
-
- // The relative path to use for the @imports.
- paths: ["app/styles"],
-
- // Rewrite image paths during release to be relative to the `img`
- // directory.
- forceRelative: "/app/img/"
- }
- },
-
- // Minfiy the distribution CSS.
- cssmin: {
- release: {
- files: {
- "dist/styles.min.css": ["dist/styles.css"]
- }
- }
- },
-
- server: {
- options: {
- host: "0.0.0.0",
- port: 8000
- },
-
- development: {},
-
- release: {
- options: {
- prefix: "dist"
- }
- },
-
- test: {
- options: {
- forever: false,
- port: 8001
- }
- }
- },
-
- processhtml: {
- release: {
- files: {
- "dist/index.html": ["index.html"]
- }
- }
- },
-
- // Move vendor and app logic during a build.
- copy: {
- release: {
- files: [
- { src: ["app/**"], dest: "dist/" },
- { src: "vendor/**", dest: "dist/" }
- ]
- }
- },
-
- compress: {
- release: {
- options: {
- archive: "dist/source.min.js.gz"
- },
-
- files: ["dist/source.min.js"]
- }
- },
-
- // Unit testing is provided by Karma. Change the two commented locations
- // below to either: mocha, jasmine, or qunit.
- karma: {
- options: {
- basePath: process.cwd(),
- singleRun: true,
- captureTimeout: 7000,
- autoWatch: true,
-
- reporters: ["progress", "coverage"],
- browsers: ["PhantomJS"],
-
- // Change this to the framework you want to use.
- frameworks: ["mocha"],
-
- plugins: [
- "karma-jasmine",
- "karma-mocha",
- "karma-qunit",
- "karma-phantomjs-launcher",
- "karma-coverage"
- ],
-
- preprocessors: {
- "app/**/*.js": "coverage"
- },
-
- coverageReporter: {
- type: "lcov",
- dir: "test/coverage"
- },
-
- files: [
- // You can optionally remove this or swap out for a different expect.
- "vendor/bower/chai/chai.js",
- "vendor/bower/requirejs/require.js",
- "test/runner.js",
-
- { pattern: "app/**/*.*", included: false },
- // Derives test framework from Karma configuration.
- {
- pattern: "test/<%= karma.options.frameworks[0] %>/**/*.spec.js",
- included: false
- },
- { pattern: "vendor/**/*.js", included: false }
- ]
- },
-
- // This creates a server that will automatically run your tests when you
- // save a file and display results in the terminal.
- daemon: {
- options: {
- singleRun: false
- }
- },
-
- // This is useful for running the tests just once.
- run: {
- options: {
- singleRun: true
- }
- }
- },
-
- coveralls: {
- options: {
- coverage_dir: "test/coverage/PhantomJS 1.9.2 (Linux)/"
- }
- }
- });
-
- // Grunt contribution tasks.
- grunt.loadNpmTasks("grunt-contrib-clean");
- grunt.loadNpmTasks("grunt-contrib-jshint");
- grunt.loadNpmTasks("grunt-contrib-cssmin");
- grunt.loadNpmTasks("grunt-contrib-copy");
- grunt.loadNpmTasks("grunt-contrib-compress");
-
- // Third-party tasks.
- grunt.loadNpmTasks("grunt-karma");
- grunt.loadNpmTasks("grunt-karma-coveralls");
- grunt.loadNpmTasks("grunt-processhtml");
-
- // Grunt BBB tasks.
- grunt.loadNpmTasks("grunt-bbb-server");
- grunt.loadNpmTasks("grunt-bbb-requirejs");
- grunt.loadNpmTasks("grunt-bbb-styles");
-
- // Create an aliased test task.
- grunt.registerTask("test", ["karma:run"]);
-
- // When running the default Grunt command, just lint the code.
- grunt.registerTask("default", [
- "clean",
- "jshint",
- "processhtml",
- "copy",
- "requirejs",
- "styles",
- "cssmin",
- //"compress",
- ]);
-};
diff --git a/LICENSE b/LICENSE
index 80bc57c..8fe4c2f 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2013 Tim Branyen
+Copyright (c) 2014 Tim Branyen
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
diff --git a/README.md b/README.md
index 97ba5a3..3be418b 100644
--- a/README.md
+++ b/README.md
@@ -12,7 +12,7 @@ Finally, a repository can be clicked and recent commits displayed.
## Running locally ##
To run locally you will need to install [Node.js](http://nodejs.org) and
-[grunt](http://github.com/gruntjs/grunt).
+[Grunt](http://gruntjs.com).
``` bash
# Clone the repository.
@@ -22,7 +22,7 @@ git clone git://github.com/tbranyen/github-viewer.git
cd github-viewer
# Install the Node dependencies and Bower dependencies.
-npm install -q
+npm install
# Run the server
grunt server
diff --git a/app/components/commit/item/view.js b/app/components/commit/item/view.js
index c2a886f..17687ea 100644
--- a/app/components/commit/item/view.js
+++ b/app/components/commit/item/view.js
@@ -4,7 +4,7 @@ define(function(require, exports, module) {
var Layout = require("layoutmanager");
var CommitItemView = Layout.extend({
- template: require("ldsh!./template"),
+ template: require("template!./template"),
el: false,
diff --git a/app/components/commit/list/view.js b/app/components/commit/list/view.js
index 916c274..90a898c 100644
--- a/app/components/commit/list/view.js
+++ b/app/components/commit/list/view.js
@@ -5,7 +5,7 @@ define(function(require, exports, module) {
var Item = require("../item/view");
var Layout = Backbone.Layout.extend({
- template: require("ldsh!./template"),
+ template: require("template!./template"),
beforeRender: function() {
this.collection.each(function(commit) {
diff --git a/app/components/repo/item/template.html b/app/components/repo/item/template.html
index 1009807..b7d1f42 100644
--- a/app/components/repo/item/template.html
+++ b/app/components/repo/item/template.html
@@ -1 +1 @@
-<%= model.get("name") %>
+{{ model.attributes.name }}
diff --git a/app/components/repo/item/view.js b/app/components/repo/item/view.js
index 0cbe87c..fe49eb3 100644
--- a/app/components/repo/item/view.js
+++ b/app/components/repo/item/view.js
@@ -4,7 +4,7 @@ define(function(require, exports, module) {
var app = require("app");
var Layout = Backbone.Layout.extend({
- template: require("ldsh!./template"),
+ template: require("template!./template"),
tagName: "li",
diff --git a/app/components/repo/list/template.html b/app/components/repo/list/template.html
index ecf93c4..70a6d5b 100644
--- a/app/components/repo/list/template.html
+++ b/app/components/repo/list/template.html
@@ -1,12 +1,12 @@
-<% if (repos.isRequest) { %>
+{% if repos.isRequest %}
-<% } else { %>
- <% if (repos.length) { %>
+{% else %}
+ {% if repos.length %}