work-bench 1.0.9 → 1.0.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -15,6 +15,7 @@ module Workbench
15
15
  use Rack::ShowExceptions
16
16
  use Rack::ContentLength
17
17
 
18
+ # Set config for Compass and SASS
18
19
  Compass.configuration do |config|
19
20
  config.project_path = path
20
21
  config.http_path = '/'
@@ -41,8 +42,8 @@ module Workbench
41
42
 
42
43
  # Start Unicorn server
43
44
  #
44
- # @param port [Numeric] port number
45
- # @param workers [Number] workers count
45
+ # @param [Numeric] port port number
46
+ # @param [Number] workers workers count
46
47
  def start port, workers
47
48
  Unicorn::HttpServer.new(@app, {
48
49
  :listeners => [port],
@@ -13,7 +13,7 @@ module Workbench
13
13
 
14
14
  # Start Unicorn server
15
15
  #
16
- # @param [String] path path to new project directory
16
+ # @param [String] path path to project directory
17
17
  #
18
18
  # @example
19
19
  # workbench start
@@ -27,7 +27,7 @@ module Workbench
27
27
  method_option :workers, :aliases => '-w', :type => :numeric, :default => 4, :desc => 'Workers'
28
28
  def start path = '.'
29
29
  path = File.expand_path path
30
- puts 'Starting HTTP server...'
30
+ puts 'Starting HTTP server...'.color(:green)
31
31
  app = Workbench::Application.new path
32
32
  app.start options[:port], options[:workers]
33
33
  end
@@ -42,12 +42,12 @@ module Workbench
42
42
  # @example
43
43
  # workbench init project/
44
44
  #
45
- desc 'init [PATH] [--js=frameworks]', 'Initialize empty project in current directory'
46
- long_desc 'Initialize empty project in current directory'
45
+ desc 'init [PATH] [--js=frameworks]', 'Initialize empty project'
46
+ long_desc 'Initialize empty project'
47
47
  method_option :js, :type => :array, :default => ['jquery'], :desc => 'Install specific JS frameworks', :banner => 'jquery jquery-ui json'
48
48
  method_option :normalize, :type => :boolean, :default => true, :desc => 'Add _normalize.css (https://github.com/jonathantneal/normalize.css)'
49
49
  def init path = '.'
50
- puts 'Create empty project'
50
+ puts 'Create empty project'.color(:green)
51
51
 
52
52
  self.destination_root = File.expand_path path
53
53
 
@@ -81,10 +81,10 @@ module Workbench
81
81
  # Export project to specific directory
82
82
  #
83
83
  # @param [String] path export directory
84
- desc 'export [PATH]', 'Export project'
85
- method_option :fix, :type => :boolean, :desc => 'Fix relative urls'
84
+ desc 'export [PATH] [--fix-urls]', 'Export project'
85
+ method_option :fix_urls, :type => :boolean, :default => true, :desc => 'Fix relative server urls'
86
86
  def export path = 'export'
87
- export = Workbench::Exporter.new File.expand_path('.'), File.join(File.expand_path('.'), path), options[:fix]
87
+ export = Workbench::Exporter.new File.expand_path('.'), File.join(File.expand_path('.'), path), options[:fix_urls]
88
88
  export.process
89
89
  end
90
90
 
@@ -1,3 +1,3 @@
1
1
  module Workbench
2
- VERSION = "1.0.9"
2
+ VERSION = "1.0.10"
3
3
  end
data/lib/work_bench.rb CHANGED
@@ -5,7 +5,6 @@ require 'work_bench/application'
5
5
  require 'work_bench/cli'
6
6
  require 'work_bench/dynamic_handler'
7
7
  require 'work_bench/haml_renderer'
8
- require 'work_bench/haml_helpers'
9
8
  require 'work_bench/exporter'
10
9
 
11
10
  Workbench::Cli.start
@@ -0,0 +1,68 @@
1
+ /* normalize.css 2011-07-06T20:20 UTC //github.com/jonathantneal/normalize.css */
2
+ article, aside, details, figcaption, figure, footer, header, hgroup, nav, section { display: block; }
3
+
4
+ html { cursor: default; font-size: 100%; overflow-y: scroll; -webkit-tap-highlight-color: transparent; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; }
5
+
6
+ body, form, input, button, select, textarea { font-size: 100%; margin: 0; }
7
+
8
+ a, a:active, a:hover { outline: none; }
9
+
10
+ a:focus { outline: thin dotted; }
11
+
12
+ abbr { _border-bottom: expression(this.title ? '1px dotted':'none'); }
13
+
14
+ abbr[title] { border-bottom: 1px dotted; }
15
+
16
+ b, strong { font-weight: bold; }
17
+
18
+ dfn { font-style: italic; }
19
+
20
+ mark { background: #FF0; color: #000; }
21
+
22
+ pre, code, kbd, samp { font-family: monospace,monospace; _font-family: 'courier new',monospace; font-size: 1em; }
23
+
24
+ pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; }
25
+
26
+ q { quotes: none; }
27
+
28
+ q:before, q:after { content: ''; content: none; }
29
+
30
+ small, sub, sup { font-size: 75%; }
31
+
32
+ sub, sup { line-height: 0; position: relative; vertical-align: baseline; }
33
+
34
+ sup { top: -0.5em; }
35
+
36
+ sub { bottom: -0.25em; }
37
+
38
+ nav ul { list-style: none; }
39
+
40
+ audio[controls], canvas, video { display: inline-block; *display: inline; }
41
+
42
+ audio { display: none; _display: expression(this.controls ? 'inline':'none'); *zoom: 1; }
43
+
44
+ audio[controls] { display: inline-block; }
45
+
46
+ img { border: 0; -ms-interpolation-mode: bicubic; }
47
+
48
+ svg:not(:root) { overflow: hidden; }
49
+
50
+ legend { *margin-left: -7px; }
51
+
52
+ button, input, select, textarea { -webkit-appearance: none; border-radius: 0; vertical-align: baseline; *vertical-align: middle; }
53
+
54
+ button, input { line-height: normal; _overflow: expression(this.type == 'button|reset|submit' ? 'visible':''); }
55
+
56
+ button, input[type="button"], input[type="reset"], input[type="submit"] { overflow: visible; }
57
+
58
+ input[type="checkbox"], input[type="radio"] { box-sizing: border-box; }
59
+
60
+ input[type="search"] { -moz-box-sizing: content-box; -webkit-box-sizing: content-box; box-sizing: content-box; }
61
+
62
+ input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; }
63
+
64
+ button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; }
65
+
66
+ textarea { overflow: auto; vertical-align: top; }
67
+
68
+ table { border-collapse: collapse; border-spacing: 0; }
@@ -0,0 +1 @@
1
+ body { color: red; }
@@ -0,0 +1 @@
1
+ {}
@@ -0,0 +1 @@
1
+ <img src="img/garvcover005.jpg">