Skip to content

Commit

Permalink
allow specifying loadPath in syntax checking
Browse files Browse the repository at this point in the history
otherwise syntax checking will complain about includes not being found
  • Loading branch information
voxpelli committed Feb 7, 2015
1 parent 4ab2918 commit 0bc73d5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tasks/lib/check.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use strict';
var path = require('path');
var dargs = require('dargs');
var async = require('async');
var chalk = require('chalk');
var spawn = require('cross-spawn');
Expand All @@ -16,6 +17,11 @@ module.exports = function (files, options, cb) {
var bin;
var args;

var passedArgs = dargs(options, {
includes: ['loadPath'],
ignoreFalse: true
});

if (options.bundleExec) {
bin = 'bundle';
args = ['exec', 'sass', '--check', src];
Expand All @@ -24,6 +30,8 @@ module.exports = function (files, options, cb) {
args = ['--check', src];
}

args = args.concat(passedArgs);

grunt.verbose.writeln('Command: ' + bin + ' ' + args.join(' '));

grunt.verbose.writeln('Checking file ' + chalk.cyan(src) + ' syntax.');
Expand Down

0 comments on commit 0bc73d5

Please sign in to comment.