Skip to content

Commit

Permalink
Replaced zship/grunt-contrib-jasmine dependency with the (now AMD-com…
Browse files Browse the repository at this point in the history
…patible) gruntjs/grunt-contrib-jasmine

- Removed grunt-amd-test (grunt-contrib-jasmine covers the same functionality)
- Removed grunt-amd-check (not actively developed; amd-cli is an alternative)
- Removed grunt-amd-dist (lavaca-starter is the more appropriate place for project build scripts)
- Fixed broken boot.js jquery reference to get unit tests running properly
  • Loading branch information
zship committed Apr 17, 2014
1 parent 34d4347 commit c880f0f
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 21 deletions.
32 changes: 18 additions & 14 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
module.exports = function(grunt) {
'use strict';
'use strict';
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),

jasmine: {
all: ['test/runner.html'],
options: {
junit: {
path: 'log/tests',
consolidate: true
all: {
// PhantomJS is not fully ES5-compatible; shim it
src: 'src/components/es5-shim/es5-shim.js',
options: {
specs: 'test/unit/**/*.js',
template: require('grunt-template-jasmine-requirejs'),
templateOptions: {
requireConfigFile: 'src/boot.js',
requireConfig: {
baseUrl: 'src'
}
},
keepRunner: true
}
}
},
'amd-test': {
mode: 'jasmine',
files: 'test/unit/**/*.js'
},

jshint: {
src: {
options: {
Expand All @@ -34,6 +40,7 @@ module.exports = function(grunt) {
}
}
},

yuidoc: {
compile: {
name: '<%= pkg.name %>',
Expand Down Expand Up @@ -73,14 +80,11 @@ module.exports = function(grunt) {
// These plugins provide necessary tasks.
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-jasmine');
grunt.loadNpmTasks('grunt-amd-dist');
grunt.loadNpmTasks('grunt-amd-check');
grunt.loadNpmTasks('grunt-amd-test');
grunt.loadNpmTasks('grunt-contrib-yuidoc');
grunt.loadNpmTasks('grunt-open');

// Default task.
grunt.registerTask('doc', ['yuidoc', 'open:doc']);
grunt.registerTask('test', 'generates runner and runs the tests', ['amd-test', 'jasmine']);
grunt.registerTask('test', 'generates runner and runs the tests', ['jasmine']);

};
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-jshint": "~0.6.0",
"grunt-amd-dist": "0.4.x",
"grunt-amd-check": "0.5.x",
"grunt-amd-test": "0.4.x",
"grunt-contrib-jasmine": "git://github.com/zship/grunt-contrib-jasmine.git",
"grunt-contrib-jasmine": "0.5.3",
"grunt-template-jasmine-requirejs": "0.1.10",
"grunt-contrib-yuidoc": "0.4.0",
"grunt-open": "~0.2.1",
"fs-extra": "~0.6.3"
Expand Down
6 changes: 3 additions & 3 deletions src/boot.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ require.config({
baseUrl: './',
paths: {
'es5-shim': 'components/es5-shim/es5-shim',
'$': 'components/jquery/index',
'jquery': 'components/jquery/index',
'$': 'components/jquery/jquery',
'jquery': 'components/jquery/jquery',
'mout': 'components/mout/src',
'dust': 'components/dustjs-linkedin/dist/dust-full-2.0.3',
'dust-helpers': 'components/dustjs-linkedin-helpers/dist/dust-helpers-1.1.1',
Expand All @@ -30,4 +30,4 @@ require.config({
}
});
require(['es5-shim']);
require(['app/app']);
require(['app/app']);

0 comments on commit c880f0f

Please sign in to comment.