Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'master' of https://github.com/janeklb/moodle
  • Loading branch information
andrewnicols authored and danpoltawski committed Jan 12, 2016
2 parents 0755d63 + c9b6fee commit dc8675f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Gruntfile.js
Expand Up @@ -26,13 +26,14 @@ module.exports = function(grunt) {
var path = require('path'),
fs = require('fs'),
tasks = {},
cwd = process.env.PWD || process.cwd();
cwd = process.env.PWD || process.cwd(),
inAMD = path.basename(cwd) == 'amd';

// Project configuration.
grunt.initConfig({
jshint: {
options: {jshintrc: '.jshintrc'},
files: ['**/amd/src/*.js']
files: [inAMD ? cwd + '/src/*.js' : '**/amd/src/*.js']
},
uglify: {
dynamic_mappings: {
Expand Down Expand Up @@ -222,7 +223,7 @@ module.exports = function(grunt) {
if (path.basename(path.resolve(cwd, '../../')) == 'yui') {
grunt.task.run('shifter');
// Are we in an AMD directory?
} else if (path.basename(cwd) == 'amd') {
} else if (inAMD) {
grunt.task.run('amd');
} else {
// Run them all!.
Expand Down

0 comments on commit dc8675f

Please sign in to comment.