juscr 0.10.0 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/bin/juscr +40 -12
  2. metadata +4 -4
data/bin/juscr CHANGED
@@ -7,25 +7,23 @@ require "juscrcompiler.rb"
7
7
  require 'juscrconfigparser.rb'
8
8
 
9
9
  class Controller < SimpleConsole::Controller
10
+
10
11
  params :bool => {:c => :compress,
11
- :h => :help},
12
+ :h => :help,
13
+ :v => :version},
12
14
  :string => {:f => :files,
13
15
  :d => :directory,
14
16
  :n => :name}
15
17
  def default
16
- puts <<DOC
17
- Usage: juscr [action] [options]
18
-
19
- Description:
20
- The juscr command line tool will compile and compress your javascript application into modules.
21
-
22
- To compile and compress your javascript application into module files:
23
-
24
- juscr compile -c
18
+ @version = '0.11.0'
25
19
 
26
- DOC
20
+ if params[:version]
21
+ version
22
+ else
23
+ show_docs
24
+ end
27
25
  end
28
-
26
+
29
27
  def compile
30
28
  begin
31
29
  raise ArgumentError, "You must specify an output filename: -n 'compressed.js" if params[:name].nil?
@@ -77,6 +75,36 @@ DOC
77
75
  puts e.backtrace.inspect
78
76
  end
79
77
  end
78
+
79
+ def version
80
+ puts 'juscr ' << @version << ' (2010-7-3)'
81
+ end
82
+
83
+ def show_docs
84
+ puts <<DOC
85
+
86
+ Juscr @version by Dayton Nolan
87
+ Usage: juscr [action] [options]
88
+
89
+ Description:
90
+ Compile and compress multiple javascript files into a single file
91
+
92
+ To compile and javascript files and compress them with JSMin:
93
+
94
+ juscr compile -f 'jquery-1.4.1.min, jquery.plugin.js, myjavascript.js' -n 'compiledscripts.js'
95
+
96
+ Options:
97
+ -n, --name Specify the name of the compiled output file
98
+
99
+
100
+ Mode Options(only specify one):
101
+ -f, --files Comma dilineated string of files to compiled
102
+ -d, --directory Name of directory containing files to compile
103
+
104
+ -?, -h, --help
105
+
106
+ DOC
107
+ end
80
108
 
81
109
  end
82
110
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: juscr
3
3
  version: !ruby/object:Gem::Version
4
- hash: 55
4
+ hash: 51
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 10
8
+ - 11
9
9
  - 0
10
- version: 0.10.0
10
+ version: 0.11.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Dayton Nolan
@@ -19,7 +19,7 @@ date: 2010-06-25 00:00:00 -05:00
19
19
  default_executable: bin/juscr
20
20
  dependencies: []
21
21
 
22
- description: Juscr is a javascript compiler that helps you create javascript applications that are easier to write, manage and deploy.
22
+ description: Compiles and compresses multiple javascript files into a single file
23
23
  email: daytonn@gmail.com
24
24
  executables:
25
25
  - juscr