toadstool 0.0.0.5 → 0.0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/bin/toadstool +59 -63
- data/lib/stylesheets/_toadstool-styleguide.scss +1 -8
- data/lib/stylesheets/toadstool/_buttons.scss +7 -2
- data/lib/stylesheets/toadstool/modules/_main_nav.scss +6 -2
- data/lib/templates/module/sass/%shiitake%/_%shiitake%.sass +2 -0
- data/lib/templates/module/sass/{_extends.scss → %shiitake%/_extends.scss} +0 -0
- data/lib/templates/module/sass/{_mixins.scss → %shiitake%/_mixins.scss} +0 -0
- data/lib/templates/module/views/{module.erb → _%shiitake%.erb} +0 -0
- data/lib/templates/module/views/{module.js → readme.md} +0 -0
- data/lib/templates/pattern/sass/%shiitake%/_%shiitake%.sass +2 -0
- data/lib/templates/{ui_pattern/sass → pattern/sass/%shiitake%}/_extends.scss +0 -0
- data/lib/templates/{ui_pattern/sass → pattern/sass/%shiitake%}/_mixins.scss +0 -0
- data/lib/templates/{module/views/view.erb → pattern/views/_%shiitake%.erb} +0 -0
- data/lib/templates/{project/sass/layouts/_example_layout.scss → pattern/views/readme.md} +0 -0
- data/lib/templates/project/Gemfile +1 -2
- data/lib/templates/project/public/favicon.ico +0 -0
- data/lib/templates/project/sass/_modules.scss +0 -0
- data/lib/templates/project/sass/_ui_patterns.scss +0 -0
- data/lib/templates/project/sass/style.scss +2 -3
- data/lib/templates/project/toadstool.rb +1 -1
- metadata +15 -13
- data/lib/templates/module/sass/_example_module.scss +0 -4
- data/lib/templates/ui_pattern/sass/_example_pattern.scss +0 -4
- data/lib/templates/ui_pattern/views/example.erb +0 -1
data/lib/bin/toadstool
CHANGED
@@ -14,94 +14,90 @@ module Toadstool
|
|
14
14
|
|
15
15
|
# Define arguments and options
|
16
16
|
argument :name, {:default => './'}
|
17
|
+
class_option :styleguide_directory, :type => :string, :default => "./styleguide/", :desc => 'The directory for the Toadstool app.'
|
17
18
|
|
18
19
|
def self.source_root
|
19
20
|
APP_PATH
|
20
21
|
end
|
21
22
|
|
22
23
|
def install_app
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
copy_file "project/
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
copy_file "project/toadstool.rb", "#{name}/toadstool.rb"
|
24
|
+
directory "project/doc-src", "#{install_directory}/doc-src"
|
25
|
+
directory "project/public", "#{install_directory}/public"
|
26
|
+
directory "project/sass", "#{install_directory}/sass"
|
27
|
+
directory "project/views", "#{install_directory}/views"
|
28
|
+
|
29
|
+
copy_file "project/config.rb", "#{install_directory}/config.rb"
|
30
|
+
copy_file "project/config.ru", "#{install_directory}/config.ru"
|
31
|
+
copy_file "project/Gemfile", "#{install_directory}/Gemfile"
|
32
|
+
copy_file "project/Rakefile", "#{install_directory}/Rakefile"
|
33
|
+
copy_file "project/readme.md", "#{install_directory}/readme.md"
|
34
|
+
copy_file "project/toadstool.rb", "#{install_directory}/toadstool.rb"
|
35
|
+
end
|
36
|
+
|
37
|
+
def install_directory
|
38
|
+
File.join('./', name, options[:styleguide_directory])
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
42
42
|
class Server < Thor::Group
|
43
|
-
def
|
43
|
+
def start # no desc
|
44
|
+
|
44
45
|
cwd = Dir.pwd
|
45
|
-
return unless
|
46
|
-
exec 'rackup', *ARGV if
|
46
|
+
return unless in_toadstool_app? || in_app_subdirectory?
|
47
|
+
exec 'rackup', *ARGV if in_toadstool_app?
|
47
48
|
Dir.chdir("..") do
|
48
49
|
# Recurse in a chdir block: if the search fails we want to be sure
|
49
50
|
# the application is generated in the original working directory.
|
50
|
-
|
51
|
+
start! unless cwd == Dir.pwd
|
51
52
|
end
|
52
53
|
rescue SystemCallError
|
53
54
|
# could not chdir, no problem just return
|
54
55
|
end
|
55
|
-
|
56
|
-
no_tasks do
|
57
|
-
def in_rails_application?
|
58
|
-
File.exists?('config.ru')
|
59
|
-
end
|
60
56
|
|
57
|
+
no_tasks do
|
58
|
+
def in_toadstool_app?
|
59
|
+
File.exists?('toadstool.rb') && File.exists?('config.ru')
|
60
|
+
end
|
61
61
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
62
|
+
def in_app_subdirectory?(path = Pathname.new(Dir.pwd))
|
63
|
+
File.exists?(File.join(path, 'config.ru')) || !path.root? && in_app_subdirectory?(path.parent)
|
64
|
+
end
|
65
|
+
end
|
66
66
|
end
|
67
|
-
|
68
|
-
|
69
67
|
|
70
|
-
# end
|
71
|
-
#
|
72
|
-
#
|
73
|
-
# module Toadstool
|
74
68
|
class Generator < Thor
|
69
|
+
def self.source_root
|
70
|
+
APP_PATH
|
71
|
+
end
|
72
|
+
|
75
73
|
include Thor::Actions
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
create_file 'sass/_modules.sass' if !File.exist?('sass/_modules.sass')
|
88
|
-
|
89
|
-
append_file 'sass/_modules.sass', "@import 'modules/#{name}/#{state}/#{state}'"
|
90
|
-
end
|
74
|
+
argument :truffle
|
75
|
+
argument :oil
|
76
|
+
|
77
|
+
desc 'ts_module', "Generate a module"
|
78
|
+
def ts_module
|
79
|
+
directory "module/views", "views/modules/#{truffle}"
|
80
|
+
directory "module/sass", "sass/modules/#{truffle}"
|
81
|
+
|
82
|
+
append_file 'sass/_modules.scss', "@import 'modules/#{truffle}/#{oil}/#{oil}'"
|
83
|
+
end
|
91
84
|
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
85
|
+
desc 'pattern', "Generate a module"
|
86
|
+
def pattern
|
87
|
+
directory "pattern/views", "views/ui_patterns/#{truffle}"
|
88
|
+
directory "pattern/sass", "sass/ui_patterns/#{truffle}"
|
89
|
+
|
90
|
+
append_file 'sass/_ui_patterns.scss', "@import 'ui_patterns/#{truffle}/#{oil}/#{oil}'"
|
91
|
+
end
|
92
|
+
|
93
|
+
no_tasks do
|
94
|
+
def shiitake
|
95
|
+
"#{oil}"
|
103
96
|
end
|
104
97
|
end
|
98
|
+
|
99
|
+
map 'module' => 'ts_module'
|
100
|
+
end
|
105
101
|
end
|
106
102
|
|
107
103
|
|
@@ -112,7 +108,8 @@ ARGV << '--help' if ARGV.empty?
|
|
112
108
|
aliases = {
|
113
109
|
"i" => "install",
|
114
110
|
"new" => "install",
|
115
|
-
"s" => "server"
|
111
|
+
"s" => "server",
|
112
|
+
"g" => "generate"
|
116
113
|
}
|
117
114
|
|
118
115
|
|
@@ -135,7 +132,6 @@ when 'install'
|
|
135
132
|
Toadstool::Install.start
|
136
133
|
when 'server'
|
137
134
|
Toadstool::Server.start
|
138
|
-
|
139
135
|
when 'generate'
|
140
136
|
Toadstool::Generator.start
|
141
137
|
else
|
@@ -11,14 +11,7 @@
|
|
11
11
|
|
12
12
|
// Following sequence will load the necessary Stipe libraries
|
13
13
|
// ------------------------------------------------------------------------------
|
14
|
-
@import "stipe/
|
15
|
-
@import "stipe/stipe";
|
16
|
-
@import "stipe/media";
|
17
|
-
@import "stipe/typography";
|
18
|
-
@import "stipe/grid";
|
19
|
-
@import "stipe/forms";
|
20
|
-
@import "stipe/color";
|
21
|
-
@import "stipe/gradients";
|
14
|
+
@import "stipe/manifest";
|
22
15
|
|
23
16
|
|
24
17
|
|
@@ -1,8 +1,13 @@
|
|
1
1
|
[class*="toadstool"] {
|
2
2
|
.nav_toggle {
|
3
|
-
|
3
|
+
$nav_toggle_gradient: $delta_gray 0%, $alpha_gray 100%;
|
4
|
+
$nav_toggle_gradient_hover: $alpha_gray 0%, $delta_gray 100%;
|
5
|
+
|
6
|
+
@include linear_gradient_w3c ($alpha_gray, $nav_toggle_gradient);
|
7
|
+
|
8
|
+
//@include linear_gradient_w3c (#e4e4e4, #{#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%});
|
4
9
|
&:hover {
|
5
|
-
@include linear_gradient_w3c ($alpha_gray,
|
10
|
+
@include linear_gradient_w3c ($alpha_gray, $nav_toggle_gradient_hover);
|
6
11
|
border-color: $alpha_gray;
|
7
12
|
box-shadow: 0 0 0;
|
8
13
|
}
|
@@ -5,7 +5,9 @@
|
|
5
5
|
font-weight: bold;
|
6
6
|
@media #{$mobile} {
|
7
7
|
@include flexbox(100%, auto, $orient: vertical);
|
8
|
-
|
8
|
+
|
9
|
+
$toadstool_nav_gradient: $bravo_gray 30%, $delta_gray 100%;
|
10
|
+
@include linear_gradient_w3c ($bravo_gray, $toadstool_nav_gradient);
|
9
11
|
}
|
10
12
|
}
|
11
13
|
li {
|
@@ -26,7 +28,9 @@
|
|
26
28
|
}
|
27
29
|
a {
|
28
30
|
color: $white;
|
29
|
-
|
31
|
+
|
32
|
+
$toadstool_nav_gradient: $bravo_gray 50%,$delta_gray 100%;
|
33
|
+
@include linear_gradient_w3c ($bravo_gray, $toadstool_nav_gradient);
|
30
34
|
.no-flexbox & {
|
31
35
|
padding: 0 em(10);
|
32
36
|
}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
Binary file
|
File without changes
|
File without changes
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# Those little ditties that Sinatra needs to make the magic happen
|
2
2
|
# -----------------------------------------------------------------------
|
3
3
|
require 'rubygems'
|
4
|
-
|
4
|
+
|
5
5
|
|
6
6
|
# If you're using bundler, you will need to add this
|
7
7
|
require 'bundler/setup'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: toadstool
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.0.
|
4
|
+
version: 0.0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: lib/bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-
|
13
|
+
date: 2013-04-03 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: sinatra
|
@@ -132,12 +132,16 @@ files:
|
|
132
132
|
- lib/stylesheets/toadstool/ui_patterns/_color_grid.scss
|
133
133
|
- lib/stylesheets/toadstool/ui_patterns/_emBox.scss
|
134
134
|
- lib/stylesheets/toadstool/ui_patterns/_prettify.scss
|
135
|
-
- lib/templates/module/sass
|
136
|
-
- lib/templates/module/sass
|
137
|
-
- lib/templates/module/sass
|
138
|
-
- lib/templates/module/views/
|
139
|
-
- lib/templates/module/views/
|
140
|
-
- lib/templates/
|
135
|
+
- lib/templates/module/sass/%shiitake%/_%shiitake%.sass
|
136
|
+
- lib/templates/module/sass/%shiitake%/_extends.scss
|
137
|
+
- lib/templates/module/sass/%shiitake%/_mixins.scss
|
138
|
+
- lib/templates/module/views/_%shiitake%.erb
|
139
|
+
- lib/templates/module/views/readme.md
|
140
|
+
- lib/templates/pattern/sass/%shiitake%/_%shiitake%.sass
|
141
|
+
- lib/templates/pattern/sass/%shiitake%/_extends.scss
|
142
|
+
- lib/templates/pattern/sass/%shiitake%/_mixins.scss
|
143
|
+
- lib/templates/pattern/views/_%shiitake%.erb
|
144
|
+
- lib/templates/pattern/views/readme.md
|
141
145
|
- lib/templates/project/config.rb
|
142
146
|
- lib/templates/project/config.ru
|
143
147
|
- lib/templates/project/doc-src/changelog.md
|
@@ -145,6 +149,7 @@ files:
|
|
145
149
|
- lib/templates/project/doc-src/module-sass-readme.md
|
146
150
|
- lib/templates/project/doc-src/SASS-Guidelines.md
|
147
151
|
- lib/templates/project/Gemfile
|
152
|
+
- lib/templates/project/public/favicon.ico
|
148
153
|
- lib/templates/project/public/images/toadstool-logo.png
|
149
154
|
- lib/templates/project/public/javascripts/application.js
|
150
155
|
- lib/templates/project/public/javascripts/jquery-1.8.3.min.js
|
@@ -159,8 +164,10 @@ files:
|
|
159
164
|
- lib/templates/project/sass/_config.scss
|
160
165
|
- lib/templates/project/sass/_design.scss
|
161
166
|
- lib/templates/project/sass/_forms.scss
|
167
|
+
- lib/templates/project/sass/_modules.scss
|
162
168
|
- lib/templates/project/sass/_reset.scss
|
163
169
|
- lib/templates/project/sass/_typography.scss
|
170
|
+
- lib/templates/project/sass/_ui_patterns.scss
|
164
171
|
- lib/templates/project/sass/buttons/_extends.scss
|
165
172
|
- lib/templates/project/sass/buttons/_mixins.scss
|
166
173
|
- lib/templates/project/sass/color/_color_defaults.scss
|
@@ -170,7 +177,6 @@ files:
|
|
170
177
|
- lib/templates/project/sass/color/readme.md
|
171
178
|
- lib/templates/project/sass/forms/_extends.scss
|
172
179
|
- lib/templates/project/sass/forms/_mixins.scss
|
173
|
-
- lib/templates/project/sass/layouts/_example_layout.scss
|
174
180
|
- lib/templates/project/sass/readme.md
|
175
181
|
- lib/templates/project/sass/style.scss
|
176
182
|
- lib/templates/project/sass/toadstool.scss
|
@@ -210,10 +216,6 @@ files:
|
|
210
216
|
- lib/templates/project/views/ui_patterns/readme.md
|
211
217
|
- lib/templates/project/views/ui_patterns/typography/_body_copy.erb
|
212
218
|
- lib/templates/project/views/ui_patterns/typography/_headings.erb
|
213
|
-
- lib/templates/ui_pattern/sass/_example_pattern.scss
|
214
|
-
- lib/templates/ui_pattern/sass/_extends.scss
|
215
|
-
- lib/templates/ui_pattern/sass/_mixins.scss
|
216
|
-
- lib/templates/ui_pattern/views/example.erb
|
217
219
|
- lib/toadstool/version.rb
|
218
220
|
- lib/toadstool.rb
|
219
221
|
homepage: https://github.com/Anotheruiguy/toadstool
|
@@ -1 +0,0 @@
|
|
1
|
-
example ui pattern to go here
|