Example #1
0
 // Makes filename safe strings
 cleanString(str, use_underscore) {
   const u   = use_underscore || false;
   str = str.replace(/\//g, ' ').trim();
   if (u) {
     return _s.underscored(str);
   } else {
     return _s.trim(_s.dasherize(str), '-');
   }
 }
Example #2
0
		shared.exec("jsduck --version | awk '{ print $2; }'", function(version) {
			var failed = false;
			version = trim(version);
			if (!version) {
				failed = true;
				grunt.log.writeln("jsduck is not installed. Install it by running command `" + ("gem install jsduck -v " + desiredJSDuckVersion).yellow + "`.").cyan;
			} else if (version !== desiredJSDuckVersion) {
				failed = true;
				grunt.log.writeln("jsduck version is " + version.red + " but must be " + desiredJSDuckVersion.green + ". Update it by running command `" + ("gem install jsduck -v " + desiredJSDuckVersion).yellow + "`.").cyan;
			} else {
				grunt.log.ok();
			}
			done(!failed);
		});