capucine 0.2.5 → 0.2.9
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +16 -10
- data/VERSION +1 -1
- data/bin/capucine +2 -19
- data/capucine.gemspec +1 -3
- data/content/default.yaml +16 -18
- data/content/shared/capucine.yaml +22 -20
- data/content/shared/index.html +4 -5
- data/content/shared/sass/_main.scss +1 -14
- data/content/shared/sass/screen.scss +2 -5
- data/content/templates/compass_config.erb +2 -9
- data/examples/with-all/.compass_config.rb +8 -3
- data/examples/with-all/capucine.yaml +21 -19
- data/examples/with-all/public/css_generated/screen.css +60 -105
- data/examples/with-all/sass/_main.scss +1 -14
- data/examples/with-all/sass/screen.scss +2 -5
- data/examples/with-coffeescript/capucine.yaml +21 -19
- data/examples/with-incloudr/capucine.yaml +19 -17
- data/examples/with-sass-and-compass/.compass_config.rb +8 -3
- data/examples/with-sass-and-compass/capucine.yaml +18 -16
- data/examples/with-sass-and-compass/public/css_generated/screen.css +1 -105
- data/examples/with-sass-and-compass/sass/_main.scss +1 -14
- data/examples/with-sass-and-compass/sass/screen.scss +2 -5
- data/lib/coffeescript.rb +1 -1
- data/lib/compass-sass.rb +17 -5
- data/lib/settings.rb +23 -14
- data/lib/tools.rb +1 -3
- data/spec/capucine/capucine_spec.rb +6 -6
- data/spec/capucine_coffee.yaml +20 -18
- data/spec/capucine_incloudr.yaml +29 -3
- data/spec/capucine_incloudr2.yaml +28 -3
- data/spec/capucine_incloudr3.yaml +30 -4
- metadata +2 -4
- data/content/options.yaml +0 -11
- data/examples/with-incloudr/.compass_config.rb +0 -13
@@ -1,22 +1,9 @@
|
|
1
|
-
// @include font-face('my_font',font-files('../fonts/my_font.ttf', truetype, '../fonts/my_font.otf', opentype), '../fonts/my_font.eot')
|
2
|
-
|
3
|
-
$WIDTH_MIN: 320px;
|
4
|
-
$WIDTH_MAX: 960px;
|
5
|
-
|
6
1
|
$FONT_0: "Lucida Grande", "Tahoma", Arial, sans-serif;
|
7
2
|
$COLOR_0: #111;
|
8
3
|
|
9
|
-
|
10
4
|
body {
|
11
5
|
font: normal 12px $FONT_0;
|
12
6
|
color: $COLOR_0;
|
13
7
|
}
|
14
8
|
|
15
|
-
|
16
|
-
|
17
|
-
p, b, strong, i, blockquote {line-height: 1.5em;}
|
18
|
-
|
19
|
-
.wrap {
|
20
|
-
@include centerX;
|
21
|
-
@include min-max-width($WIDTH_MIN, $WIDTH_MAX);
|
22
|
-
}
|
9
|
+
// FREEDOM
|
@@ -1,8 +1,5 @@
|
|
1
|
-
// @import "compass"; // COMPASS ALL
|
2
|
-
@import "compass/css3"; // COMPASS CSS3
|
3
1
|
@import "compass/reset"; // COMPASS RESET
|
4
|
-
|
5
|
-
@import "compass-capucine"; // CAPUCINE HELPERS =>
|
2
|
+
@import "compass/css3"; // COMPASS CSS3
|
6
3
|
|
7
4
|
@import "./main";
|
8
|
-
@import "./responsive";
|
5
|
+
@import "./responsive";
|
@@ -1,30 +1,32 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
#
|
1
|
+
# use_compass: true
|
2
|
+
use_coffeescript: true
|
3
|
+
# use_incloudr: true
|
4
4
|
|
5
|
-
#
|
6
|
-
#
|
7
|
-
#
|
8
|
-
#
|
9
|
-
# sass_line_comments: false
|
10
|
-
# sass_css_generated_style: expanded # compact | expanded | compressed
|
11
|
-
# sass_options: '{:cache => false}'
|
5
|
+
# ---------------[ COMPASS ]------------------------
|
6
|
+
# compass:
|
7
|
+
# sass_dir: sass
|
8
|
+
# css_dir: public/css_generated
|
12
9
|
|
13
|
-
#
|
14
|
-
#
|
15
|
-
#
|
10
|
+
# output_style: expanded # compact | expanded | compressed
|
11
|
+
# line_comments: false
|
12
|
+
# sass_options: '{:cache => false}' # please use this format (a string)
|
16
13
|
|
17
|
-
#
|
18
|
-
#
|
14
|
+
# compass_plugins:
|
15
|
+
# - compass_twitter_bootstrap
|
16
|
+
# ---------------[ IMPORT ]------------------------
|
17
|
+
# sass_import_css: true
|
18
|
+
# sass_import_formats: css to scss
|
19
19
|
# sass_import_css_dir: public/css/import
|
20
20
|
# sass_import_output_dir: sass/converted
|
21
21
|
|
22
|
-
#
|
23
|
-
|
24
|
-
|
22
|
+
# ---------------[ COFFEESCRIPT ]--------------------------
|
23
|
+
coffeescript_bare: false
|
24
|
+
coffeescript_files_dir: coffeescript
|
25
|
+
coffeescript_output_dir: public/js_generated
|
25
26
|
|
27
|
+
# ---------------[ INCLOUDR ]------------------------
|
26
28
|
# incloudr_output_dir: public/js_generated/modules
|
27
29
|
# incloudr_libs:
|
28
30
|
# - name: jquery
|
29
31
|
|
30
|
-
# DOCUMENTATION : http:// capucine.dln.name
|
32
|
+
# DOCUMENTATION : http:// capucine.dln.name
|
@@ -1,30 +1,32 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
|
1
|
+
# use_compass: true
|
2
|
+
# use_coffeescript: true
|
3
|
+
use_incloudr: true
|
4
4
|
|
5
|
-
#
|
6
|
-
#
|
7
|
-
#
|
8
|
-
#
|
9
|
-
# sass_line_comments: false
|
10
|
-
# sass_css_generated_style: expanded # compact | expanded | compressed
|
11
|
-
# sass_options: '{:cache => false}'
|
5
|
+
# ---------------[ COMPASS ]------------------------
|
6
|
+
# compass:
|
7
|
+
# sass_dir: sass
|
8
|
+
# css_dir: public/css_generated
|
12
9
|
|
13
|
-
#
|
14
|
-
#
|
15
|
-
#
|
10
|
+
# output_style: expanded # compact | expanded | compressed
|
11
|
+
# line_comments: false
|
12
|
+
# sass_options: '{:cache => false}' # please use this format (a string)
|
16
13
|
|
17
|
-
#
|
18
|
-
#
|
14
|
+
# compass_plugins:
|
15
|
+
# - compass_twitter_bootstrap
|
16
|
+
# ---------------[ IMPORT ]------------------------
|
17
|
+
# sass_import_css: true
|
18
|
+
# sass_import_formats: css to scss
|
19
19
|
# sass_import_css_dir: public/css/import
|
20
20
|
# sass_import_output_dir: sass/converted
|
21
21
|
|
22
|
+
# ---------------[ COFFEESCRIPT ]--------------------------
|
22
23
|
# coffeescript_bare: false
|
23
24
|
# coffeescript_files_dir: coffeescript
|
24
25
|
# coffeescript_output_dir: public/js_generated
|
25
26
|
|
26
|
-
#
|
27
|
+
# ---------------[ INCLOUDR ]------------------------
|
28
|
+
incloudr_output_dir: public/js_generated/modules
|
27
29
|
incloudr_libs:
|
28
30
|
- name: jquery
|
29
31
|
|
30
|
-
# DOCUMENTATION : http:// capucine.dln.name
|
32
|
+
# DOCUMENTATION : http:// capucine.dln.name
|
@@ -1,13 +1,18 @@
|
|
1
|
+
# !!!! NEVER EDIT THIS FILE !!!!
|
2
|
+
# ALWAYS EDIT : capucine.yaml
|
1
3
|
|
2
4
|
|
3
|
-
require "compass-capucine"
|
4
5
|
|
6
|
+
project_type = :stand_alone
|
5
7
|
|
6
8
|
|
7
|
-
images_dir = "public/images"
|
8
9
|
sass_dir = "sass"
|
10
|
+
|
9
11
|
css_dir = "public/css_generated"
|
12
|
+
|
13
|
+
output_style = :compressed
|
14
|
+
|
10
15
|
line_comments = false
|
11
|
-
|
16
|
+
|
12
17
|
sass_options = {:cache => false}
|
13
18
|
|
@@ -1,30 +1,32 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
#
|
1
|
+
use_compass: true
|
2
|
+
# use_coffeescript: true
|
3
|
+
# use_incloudr: true
|
4
4
|
|
5
|
-
#
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
# sass_line_comments: false
|
10
|
-
# sass_css_generated_style: expanded # compact | expanded | compressed
|
11
|
-
# sass_options: '{:cache => false}'
|
5
|
+
# ---------------[ COMPASS ]------------------------
|
6
|
+
compass:
|
7
|
+
sass_dir: sass
|
8
|
+
css_dir: public/css_generated
|
12
9
|
|
13
|
-
#
|
14
|
-
#
|
15
|
-
#
|
10
|
+
# output_style: expanded # compact | expanded | compressed
|
11
|
+
# line_comments: false
|
12
|
+
# sass_options: '{:cache => false}' # please use this format (a string)
|
16
13
|
|
17
|
-
#
|
18
|
-
#
|
14
|
+
# compass_plugins:
|
15
|
+
# - compass_twitter_bootstrap
|
16
|
+
# ---------------[ IMPORT ]------------------------
|
17
|
+
# sass_import_css: true
|
18
|
+
# sass_import_formats: css to scss
|
19
19
|
# sass_import_css_dir: public/css/import
|
20
20
|
# sass_import_output_dir: sass/converted
|
21
21
|
|
22
|
+
# ---------------[ COFFEESCRIPT ]--------------------------
|
22
23
|
# coffeescript_bare: false
|
23
24
|
# coffeescript_files_dir: coffeescript
|
24
25
|
# coffeescript_output_dir: public/js_generated
|
25
26
|
|
27
|
+
# ---------------[ INCLOUDR ]------------------------
|
26
28
|
# incloudr_output_dir: public/js_generated/modules
|
27
29
|
# incloudr_libs:
|
28
30
|
# - name: jquery
|
29
31
|
|
30
|
-
# DOCUMENTATION : http:// capucine.dln.name
|
32
|
+
# DOCUMENTATION : http:// capucine.dln.name
|
@@ -1,105 +1 @@
|
|
1
|
-
html,
|
2
|
-
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
3
|
-
a, abbr, acronym, address, big, cite, code,
|
4
|
-
del, dfn, em, img, ins, kbd, q, s, samp,
|
5
|
-
small, strike, strong, sub, sup, tt, var,
|
6
|
-
b, u, i, center,
|
7
|
-
dl, dt, dd, ol, ul, li,
|
8
|
-
fieldset, form, label, legend,
|
9
|
-
table, caption, tbody, tfoot, thead, tr, th, td,
|
10
|
-
article, aside, canvas, details, embed,
|
11
|
-
figure, figcaption, footer, header, hgroup,
|
12
|
-
menu, nav, output, ruby, section, summary,
|
13
|
-
time, mark, audio, video {
|
14
|
-
margin: 0;
|
15
|
-
padding: 0;
|
16
|
-
border: 0;
|
17
|
-
font-size: 100%;
|
18
|
-
font: inherit;
|
19
|
-
vertical-align: baseline;
|
20
|
-
}
|
21
|
-
|
22
|
-
body {
|
23
|
-
line-height: 1;
|
24
|
-
}
|
25
|
-
|
26
|
-
ol, ul {
|
27
|
-
list-style: none;
|
28
|
-
}
|
29
|
-
|
30
|
-
table {
|
31
|
-
border-collapse: collapse;
|
32
|
-
border-spacing: 0;
|
33
|
-
}
|
34
|
-
|
35
|
-
caption, th, td {
|
36
|
-
text-align: left;
|
37
|
-
font-weight: normal;
|
38
|
-
vertical-align: middle;
|
39
|
-
}
|
40
|
-
|
41
|
-
q, blockquote {
|
42
|
-
quotes: none;
|
43
|
-
}
|
44
|
-
q:before, q:after, blockquote:before, blockquote:after {
|
45
|
-
content: "";
|
46
|
-
content: none;
|
47
|
-
}
|
48
|
-
|
49
|
-
a img {
|
50
|
-
border: none;
|
51
|
-
}
|
52
|
-
|
53
|
-
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary {
|
54
|
-
display: block;
|
55
|
-
}
|
56
|
-
|
57
|
-
/* */
|
58
|
-
.unselectable {
|
59
|
-
-moz-user-select: -moz-none;
|
60
|
-
-khtml-user-select: none;
|
61
|
-
-webkit-user-select: none;
|
62
|
-
user-select: none;
|
63
|
-
}
|
64
|
-
|
65
|
-
.cf {
|
66
|
-
clear: both;
|
67
|
-
display: block;
|
68
|
-
*zoom: 1;
|
69
|
-
}
|
70
|
-
.cf:before, .cf:after {
|
71
|
-
content: "\0020";
|
72
|
-
display: table;
|
73
|
-
}
|
74
|
-
.cf:after {
|
75
|
-
clear: both;
|
76
|
-
}
|
77
|
-
|
78
|
-
.scale {
|
79
|
-
max-width: 100%;
|
80
|
-
height: auto;
|
81
|
-
}
|
82
|
-
|
83
|
-
body {
|
84
|
-
font: normal 12px "Lucida Grande", "Tahoma", Arial, sans-serif;
|
85
|
-
color: #111111;
|
86
|
-
}
|
87
|
-
|
88
|
-
a:active, .pressed:active {
|
89
|
-
position: relative;
|
90
|
-
top: 1px;
|
91
|
-
}
|
92
|
-
|
93
|
-
p, b, strong, i, blockquote {
|
94
|
-
line-height: 1.5em;
|
95
|
-
}
|
96
|
-
|
97
|
-
.wrap {
|
98
|
-
margin: 0 auto;
|
99
|
-
text-align: left;
|
100
|
-
min-width: 320px;
|
101
|
-
width: auto !important;
|
102
|
-
width: 320px;
|
103
|
-
max-width: 960px;
|
104
|
-
width: expression(document.body.clientWidth > parseInt("960px") ? "960px" : "auto");
|
105
|
-
}
|
1
|
+
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font:inherit;font-size:100%;vertical-align:baseline}html{line-height:1}ol,ul{list-style:none}table{border-collapse:collapse;border-spacing:0}caption,th,td{text-align:left;font-weight:normal;vertical-align:middle}q,blockquote{quotes:none}q:before,q:after,blockquote:before,blockquote:after{content:"";content:none}a img{border:none}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary{display:block}body{font:normal 12px "Lucida Grande","Tahoma",Arial,sans-serif;color:#111}
|
@@ -1,22 +1,9 @@
|
|
1
|
-
// @include font-face('my_font',font-files('../fonts/my_font.ttf', truetype, '../fonts/my_font.otf', opentype), '../fonts/my_font.eot')
|
2
|
-
|
3
|
-
$WIDTH_MIN: 320px;
|
4
|
-
$WIDTH_MAX: 960px;
|
5
|
-
|
6
1
|
$FONT_0: "Lucida Grande", "Tahoma", Arial, sans-serif;
|
7
2
|
$COLOR_0: #111;
|
8
3
|
|
9
|
-
|
10
4
|
body {
|
11
5
|
font: normal 12px $FONT_0;
|
12
6
|
color: $COLOR_0;
|
13
7
|
}
|
14
8
|
|
15
|
-
|
16
|
-
|
17
|
-
p, b, strong, i, blockquote {line-height: 1.5em;}
|
18
|
-
|
19
|
-
.wrap {
|
20
|
-
@include centerX;
|
21
|
-
@include min-max-width($WIDTH_MIN, $WIDTH_MAX);
|
22
|
-
}
|
9
|
+
// FREEDOM
|
@@ -1,8 +1,5 @@
|
|
1
|
-
// @import "compass"; // COMPASS ALL
|
2
|
-
@import "compass/css3"; // COMPASS CSS3
|
3
1
|
@import "compass/reset"; // COMPASS RESET
|
4
|
-
|
5
|
-
@import "compass-capucine"; // CAPUCINE HELPERS =>
|
2
|
+
@import "compass/css3"; // COMPASS CSS3
|
6
3
|
|
7
4
|
@import "./main";
|
8
|
-
@import "./responsive";
|
5
|
+
@import "./responsive";
|
data/lib/coffeescript.rb
CHANGED
@@ -10,7 +10,7 @@ module Capucine
|
|
10
10
|
def run_once(file = nil)
|
11
11
|
|
12
12
|
unless file
|
13
|
-
files = Dir.glob(File.join @cap.settings.working_dir, @cap.settings.conf['coffeescript_output_dir'], '
|
13
|
+
files = Dir.glob(File.join @cap.settings.working_dir, @cap.settings.conf['coffeescript_output_dir'], '*.js')
|
14
14
|
FileUtils.rm_r files
|
15
15
|
self.compile_dir @cap.settings.conf['coffeescript_files_dir'], @cap.settings.conf['coffeescript_output_dir']
|
16
16
|
else
|
data/lib/compass-sass.rb
CHANGED
@@ -27,19 +27,31 @@ module Capucine
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def update_config
|
30
|
-
|
31
|
-
# require 'digest/md5'
|
30
|
+
|
32
31
|
|
33
32
|
template_file = File.join @cap.settings.content_dir, 'templates', 'compass_config.erb'
|
34
33
|
tmp = File.join @cap.settings.working_dir, '.compass_config.rb'
|
35
34
|
|
36
|
-
# md5 = Digest::MD5.hexdigest(@cap.settings.working_dir.to_s)
|
37
|
-
# tmp = Tempfile.new('capucine_'+md5)
|
38
35
|
@tmp_config = tmp
|
36
|
+
@cap.settings.conf['compass_custom'] = {}
|
37
|
+
|
38
|
+
boolean = %w{disable_warnings line_comments relative_assets sass_options}
|
39
|
+
symbol = %w{output_style}
|
40
|
+
|
41
|
+
for k, v in @cap.settings.conf['compass']
|
42
|
+
if boolean.include?(k)
|
43
|
+
v = "#{v}"
|
44
|
+
elsif symbol.include?(k)
|
45
|
+
v = ":#{v}"
|
46
|
+
else
|
47
|
+
v = "\"#{v}\""
|
48
|
+
end
|
49
|
+
@cap.settings.conf['compass_custom'][k] = v
|
50
|
+
|
51
|
+
end
|
39
52
|
|
40
53
|
@cap.settings.conf['compass_plugins_list'] = []
|
41
54
|
plugins_gems = []
|
42
|
-
|
43
55
|
plugins = @cap.settings.conf['compass_plugins']
|
44
56
|
|
45
57
|
if plugins.size > 0
|
data/lib/settings.rb
CHANGED
@@ -47,10 +47,18 @@ module Capucine
|
|
47
47
|
additional = YAML::load_file(self.user_config_file)
|
48
48
|
end
|
49
49
|
|
50
|
-
|
51
50
|
if additional
|
51
|
+
blocs = %w{compass}
|
52
|
+
|
52
53
|
additional.each do |k, v|
|
53
|
-
|
54
|
+
|
55
|
+
if blocs.include?(k)
|
56
|
+
for k2, v2 in v
|
57
|
+
self.conf[k][k2] = v2
|
58
|
+
end
|
59
|
+
else
|
60
|
+
self.conf[k] = v
|
61
|
+
end
|
54
62
|
end
|
55
63
|
end
|
56
64
|
|
@@ -59,23 +67,24 @@ module Capucine
|
|
59
67
|
end
|
60
68
|
|
61
69
|
def check_valid
|
70
|
+
# puts self.conf['use_compass']
|
62
71
|
|
63
|
-
expand_coffee_out = File.join self.working_dir, self.conf['coffeescript_output_dir']
|
64
|
-
expand_coffee_in = File.join self.working_dir, self.conf['coffeescript_files_dir']
|
72
|
+
# expand_coffee_out = File.join self.working_dir, self.conf['coffeescript_output_dir']
|
73
|
+
# expand_coffee_in = File.join self.working_dir, self.conf['coffeescript_files_dir']
|
65
74
|
|
66
|
-
expand_sass_out = File.join self.working_dir, self.conf['
|
67
|
-
expand_sass_in = File.join self.working_dir, self.conf['
|
75
|
+
# expand_sass_out = File.join self.working_dir, self.conf['compass']
|
76
|
+
# expand_sass_in = File.join self.working_dir, self.conf['compass']
|
68
77
|
|
69
|
-
if expand_coffee_out == self.working_dir or expand_coffee_in == self.working_dir or expand_coffee_in == expand_coffee_out
|
70
|
-
|
71
|
-
|
72
|
-
end
|
78
|
+
# if expand_coffee_out == self.working_dir or expand_coffee_in == self.working_dir or expand_coffee_in == expand_coffee_out
|
79
|
+
# puts 'Illegal path for CoffeeScript'
|
80
|
+
# Process.exit
|
81
|
+
# end
|
73
82
|
|
74
83
|
|
75
|
-
if expand_sass_out == self.working_dir or expand_sass_in == self.working_dir or expand_sass_in == expand_sass_out
|
76
|
-
|
77
|
-
|
78
|
-
end
|
84
|
+
# if expand_sass_out == self.working_dir or expand_sass_in == self.working_dir or expand_sass_in == expand_sass_out
|
85
|
+
# puts 'Illegal path for Sass'
|
86
|
+
# Process.exit
|
87
|
+
# end
|
79
88
|
end
|
80
89
|
|
81
90
|
end
|