mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-52504 grunt: fixed scope of jshint when in amd directory
This commit is contained in:
parent
0dfcc2541a
commit
c9b6feea0e
@ -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: {
|
||||
@ -218,7 +219,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!.
|
||||
|
Loading…
x
Reference in New Issue
Block a user