From f530463ff47a48f51c33172acc7b5e5507519645 Mon Sep 17 00:00:00 2001 From: Neelabh Gupta Date: Sun, 8 Nov 2015 17:34:35 -0600 Subject: [PATCH 01/18] fix doc --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d6a158be..88285fec 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -104,7 +104,7 @@ changes from the main (upstream) repository: `git checkout master` 3. Delete the local branch: - `git branch -D my-fix-branch` + `git branch -D ` 4. Update your local `master` branch with the latest upstream version: `git pull upstream master` From a32cd4aef2d469ad79f2348ca37cc415d8f28c88 Mon Sep 17 00:00:00 2001 From: Neelabh Gupta Date: Sun, 8 Nov 2015 18:05:12 -0600 Subject: [PATCH 02/18] Use new Travis CI infrastructure and enable caching The new container-based infrastructure allows quicker build startup times, faster builds, more available resources, faster network accesses, and most importantly the ability to cache dependencies for open source projects, which was previously only available for private repositories. See http://docs.travis-ci.com/user/migrating-from-legacy/ and http://docs.travis-ci.com/user/caching/. This commit resolves #117. --- .travis.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.travis.yml b/.travis.yml index c98d3647..1ba17065 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,11 @@ +sudo: false # this ensures our build is routed to Travis CI's new container-based infrastructure language: node_js node_js: - "0.10" +cache: + directories: + - node_modules + - bower_components before_install: npm install -g bower grunt-cli notifications: email: false From 027fcad9b18c374d10ce1b4806df268c2cb0a25b Mon Sep 17 00:00:00 2001 From: Neelabh Gupta Date: Sun, 8 Nov 2015 18:56:08 -0600 Subject: [PATCH 03/18] Remove node version from Travis CI config and add Travis CI notes to documentation --- .travis.yml | 2 -- CONTRIBUTING.md | 11 +++++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1ba17065..042addf4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,5 @@ sudo: false # this ensures our build is routed to Travis CI's new container-based infrastructure language: node_js -node_js: - - "0.10" cache: directories: - node_modules diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 88285fec..c1beb716 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -179,6 +179,17 @@ have a compelling reason for it. * If you want to run the tests in a browser, run `grunt testserver` to start a local test server, then navigate to `http://localhost:9001`. +## Development notes +### Travis CI configuration. +* [We cache](.travis.yml) Bower and npm dependencies to speed up builds. The caches can be accessed + [on the web](https://travis-ci.org/cs-education/sysbuild/caches), which gives us a means to + [delete the caches](http://docs.travis-ci.com/user/caching/#Clearing-Caches) in case they are spoiled + by storing bad data in one of the cached directories. + +* You can [validate the .travis.yml file](http://docs.travis-ci.com/user/travis-lint/) before committing it to reduce + common build errors. Travis has a convenient [web-based tool](https://lint.travis-ci.org/) where you can paste the + contents of .travis.yml for validation. + ## License By contributing your code, you agree to license your contribution under the terms of the [project's license](LICENSE.md). From 9437e43241d67c8f54359a75a4f00609c3b54cc6 Mon Sep 17 00:00:00 2001 From: Neelabh Gupta Date: Sun, 8 Nov 2015 19:44:01 -0600 Subject: [PATCH 04/18] Update npm dependencies and fix corresponding breakages The "crockford" JSCS preset was updated with a new rule: "The var statement should be the first statement in the function body." We don't need this rule, so this rule has been overridden in .jscsrc. The grunt-contrib-connect plugin now uses connect 3, which moved middlewares to separate repositories. So now we need to use the serve-static middleware instead of connect.static. --- .jscsrc | 3 ++- Gruntfile.js | 16 +++++++++------- package.json | 41 +++++++++++++++++++++-------------------- 3 files changed, 32 insertions(+), 28 deletions(-) diff --git a/.jscsrc b/.jscsrc index b9bf089b..f79fd0f4 100644 --- a/.jscsrc +++ b/.jscsrc @@ -1,5 +1,6 @@ { "preset": "crockford", "requireMultipleVarDecl": null, - "disallowDanglingUnderscores": null + "disallowDanglingUnderscores": null, + "requireVarDeclFirst": null } diff --git a/Gruntfile.js b/Gruntfile.js index 67f7ccc7..356ba67e 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -6,6 +6,8 @@ // use this if you want to recursively match all subfolders: // 'test/spec/**/*.js' +var serveStatic = require('serve-static'); + module.exports = function (grunt) { // Load grunt tasks automatically @@ -108,9 +110,9 @@ module.exports = function (grunt) { options: { middleware: function (connect) { return [ - connect.static('.tmp'), - connect().use('/bower_components', connect.static('./bower_components')), - connect.static(config.app) + serveStatic('.tmp'), + connect().use('/bower_components', serveStatic('./bower_components')), + serveStatic(config.app) ]; }, livereload: false @@ -122,10 +124,10 @@ module.exports = function (grunt) { port: 9001, middleware: function (connect) { return [ - connect.static('.tmp'), - connect.static('test'), - connect().use('/bower_components', connect.static('./bower_components')), - connect.static(config.app) + serveStatic('.tmp'), + serveStatic('test'), + connect().use('/bower_components', serveStatic('./bower_components')), + serveStatic(config.app) ]; } } diff --git a/package.json b/package.json index a05f17df..f867a085 100644 --- a/package.json +++ b/package.json @@ -5,33 +5,34 @@ "dependencies": {}, "devDependencies": { "grunt": "~0.4.5", - "grunt-autoprefixer": "^3.0.0", + "grunt-autoprefixer": "^3.0.3", "grunt-bower-install": "^1.6.0", - "grunt-build-control": "^0.3.0", - "grunt-concurrent": "^1.0.0", + "grunt-build-control": "^0.6.1", + "grunt-concurrent": "^2.0.4", "grunt-contrib-clean": "^0.6.0", "grunt-contrib-concat": "^0.5.1", - "grunt-contrib-connect": "^0.10.1", - "grunt-contrib-copy": "^0.8.0", - "grunt-contrib-cssmin": "^0.12.2", - "grunt-contrib-htmlmin": "^0.4.0", - "grunt-contrib-imagemin": "^0.9.3", - "grunt-contrib-jshint": "^0.11.1", - "grunt-contrib-uglify": "^0.8.1", + "grunt-contrib-connect": "^0.11.2", + "grunt-contrib-copy": "^0.8.2", + "grunt-contrib-cssmin": "^0.14.0", + "grunt-contrib-htmlmin": "^0.6.0", + "grunt-contrib-imagemin": "^0.9.4", + "grunt-contrib-jshint": "^0.11.3", + "grunt-contrib-uglify": "^0.10.0", "grunt-contrib-watch": "^0.6.1", - "grunt-includes": "^0.5.0", - "grunt-jscs": "^1.6.0", - "grunt-mocha": "^0.4.12", - "grunt-modernizr": "^0.6.0", - "grunt-newer": "^1.1.0", + "grunt-includes": "^0.5.1", + "grunt-jscs": "^2.3.0", + "grunt-mocha": "^0.4.13", + "grunt-modernizr": "^1.0.1", + "grunt-newer": "^1.1.1", "grunt-rev": "^0.1.0", - "grunt-sass": "^0.18.1", + "grunt-sass": "^1.1.0", "grunt-shell": "^1.1.2", "grunt-svgmin": "^2.0.1", - "grunt-usemin": "^3.0.0", - "jshint-stylish": "^1.0.1", - "load-grunt-tasks": "^3.1.0", - "time-grunt": "^1.1.0" + "grunt-usemin": "^3.1.1", + "jshint-stylish": "^2.0.1", + "load-grunt-tasks": "^3.3.0", + "serve-static": "^1.10.0", + "time-grunt": "^1.2.2" }, "scripts": { "postinstall": "bower install && grunt setupJor1k && cd test/ && bower install", From 8f4dc9e0251e1471e23399b305f8d0f9a8ebe452 Mon Sep 17 00:00:00 2001 From: Neelabh Gupta Date: Sun, 8 Nov 2015 22:15:52 -0600 Subject: [PATCH 05/18] Update application and test Bower dependencies and fix corresponding breakages videojs updated its `bower.json`'s `"main"` field to use ES6 and Sass files, which are incompatible with the way we inject dependencies. So I updated `bower.json` to override that config so that `grunt bowerInstall` can inject the dependencies correctly. Gemnasium (https://gemnasium.com/cs-education/sysbuild) reports that modernizr has latest version 3.2.0, but in fact the latest version is 2.8.3, which we already have. Currently there doesn't seems to be a way to ignore certain packages in Gemnasium, so we'll have to live with the "dependencies out-of-date" badge. This isn't so bad, because we are actually using an outdated version of typeahead.js. typeahead.js cannot be updated to the next major version (0.11.x), because it introduces breaking changes into its API. It'll take some effort to support the new API. So, we need to stick with 0.10.x versions. 0.10.5 is the latest version, which we already have. --- app/index.html | 4 ++-- bower.json | 18 ++++++++++++------ test/bower.json | 4 ++-- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/app/index.html b/app/index.html index 74328804..99cc7776 100644 --- a/app/index.html +++ b/app/index.html @@ -10,7 +10,7 @@ - + @@ -346,7 +346,7 @@