Sha256: b3959d16188e7543af18f3f6893bae6d58a73da59aa5dcbb09e665a466ee76ec
Contents?: true
Size: 928 Bytes
Versions: 5
Compression:
Stored size: 928 Bytes
Contents
#!/usr/bin/env ruby require 'tty-font' require 'colorize' require 'jscop/version' require_relative '../lib/helpers/lint_ware' def show_title font = TTY::Font.new font_messge = font.write('Jscop', letter_spacing: 1) puts font_messge end def print_linter_result(error_bin, fpath) puts puts "#{error_bin.length.to_s.yellow} Offense(s) Detected" unless error_bin.empty? path_exists = File.exist?(fpath) || Dir.exist?(fpath) success_msg = 'As clean as Snow!. No offenses found in the $PATH' puts "#{success_msg} #{fpath}".green if error_bin.empty? && path_exists == true puts end def jscop_init show_title path = ARGV[0] path = '.' if ARGV.empty? error_bin = [] js_file_pattern = /(\w|\W)+.js$/ if js_file_pattern.match?(path) LintWare.init_files_linting(error_bin, path) else LintWare.init_dir_linting(error_bin, path) end print_linter_result(error_bin, path) end jscop_init
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
jscop-0.1.9 | exe/jscop |
jscop-0.1.8 | exe/jscop |
jscop-0.1.7 | exe/jscop |
jscop-0.1.6 | exe/jscop |
jscop-0.1.5 | exe/jscop |