Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
case 'less':
cssPath = path.join(options.styles, basename.replace(ext, '.less'));
break;
case 'scss':
cssPath = path.join(options.styles, '_' + basename.replace(ext, '.scss'));
break;
default:
grunt.fail.warn('Unknown preprocessor "' + options.output + '"');
return;
}
return entry.pipe(fs.createWriteStream(cssPath));
}
// Drain everything else
default:
grunt.verbose.writeln('Ignored ', entry.path);
entry.autodrain();
}
}
})
.on('close', function(){
data.map(function(val) {
grunt.verbose.ok('Type:'.yellow, grunt.util.kindOf(val));
// Skip empty data files to avoid compiler errors
if (_.isString(val)) {
grunt.file.expand(val).forEach(function(filepath) {
var checkForContent = grunt.file.read(filepath);
if (checkForContent.length === 0 || checkForContent === '') {
grunt.verbose.warn('Skipping empty path:'.yellow, val);
} else {
var parsedData = exports.readData(filepath);
metadata = grunt.config.process(_.extend({}, metadata, parsedData));
grunt.verbose.ok('metadata:'.yellow, metadata);
}
});
}
if (_.isObject(val)) {
metadata = grunt.config.process(_.extend({}, metadata, val));
grunt.verbose.ok('metadata:'.yellow, metadata);
options = grunt.util._.extend({},defaultOptions,options);
var phantomReporters = [
grunt.task.getFile('jasmine/reporters/ConsoleReporter.js'),
grunt.task.getFile('jasmine/reporters/JUnitReporter.js')
],
port = (options.server && options.server.port) || 8888;
var url = URL.format({
protocol : 'http',
hostname : '127.0.0.1',
port : port + '',
pathname : path.join(baseDir,tmpRunner)
});
grunt.verbose.subhead('Testing jasmine specs via phantom').or.writeln('Testing jasmine specs via phantom');
jasmine.buildSpecrunner(baseDir, options, phantomReporters);
var server = startServer(baseDir, port);
runPhantom(url,options,phantomReporters.length,function(err,status){
server.close();
if (typeof cb === 'function') cb(err,status);
});
};
grunt.fatal('Requires the environment variable SAUCE_USERNAME to be set');
}
var IDENTIFIER = process.env.TRAVIS_JOB_NUMBER || 'my awesome tunnel';
var taskCompletedSuccessfully = task.async();
var stunnel = new SauceTunnel(SAUCE_USERNAME, SAUCE_ACCESS_KEY, IDENTIFIER, /*tunneled*/true, /*tunnelTimeout*/5);
process.on('exit', stunnel.stop.bind(stunnel, function() {}));
stunnel.on('log:error', grunt.log.error.bind(grunt.log));
stunnel.on('log:writeln', grunt.log.writeln.bind(grunt.log));
stunnel.on('verbose:ok', grunt.verbose.ok.bind(grunt.verbose));
stunnel.on('verbose:error', grunt.verbose.error.bind(grunt.verbose));
stunnel.on('verbose:debug', grunt.verbose.debug.bind(grunt.verbose));
stunnel.on('verbose:writeln', grunt.verbose.writeln.bind(grunt.verbose));
stunnel.openTunnel(function(isOpen) {
if (shouldStayAliveForever && isOpen) {
grunt.verbose.writeln('Keeping the sauce-tunnel open forever because you used the keepalive flag `' + task.nameArgs + '`');
return;
}
grunt.verbose.writeln('To keep the sauce-tunnel open forever, use the grunt task `' + task.nameArgs + ':keepalive`');
taskCompletedSuccessfully(isOpen);
});
};
.fail(function(error) {
grunt.log.error(error);
return browser
.eval('document.documentElement.innerText || document.documentElement.textContent')
.then(grunt.verbose.writeln.bind(grunt.verbose))
.then(function() {
throw error;
});
})
.finally(function() {
child.on('exit', function(code) {
grunt.verbose.writeln('phantomjs END');
if (code) {
grunt.fatal('phantomjs FAIL');
}
});
Object.keys(obj).forEach(function(key){
grunt.verbose.ok('[' + name + '] ' + key + ': ' + obj[key]);
});
}
toRemove.forEach(function (file) {
grunt.verbose.writeln('Removing line for file "' + file + '".');
});
phantomjs.on('jasmine.begin',function(){
grunt.verbose.writeln('Starting...');
});
phantomProcess.stderr.on('data', function (data) {
grunt.verbose.writeln(data);
});