capucine 0.2.5 → 0.2.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
- a, .pressed { @include pressed-effect;}
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
- # sass: true
2
- coffee: true
3
- # incloudr: true
1
+ # use_compass: true
2
+ use_coffeescript: true
3
+ # use_incloudr: true
4
4
 
5
- # # ----------------------------------------
6
- # sass_images_dir: public/images
7
- # sass_files_dir: sass
8
- # sass_output_dir: public/css_generated
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
- # compass_config: {}
14
- # compass_plugins:
15
- # - compass-capucine
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
- # sass_import_css: false
18
- # sass_import_formats: css to sass
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_bare: false
23
- # coffeescript_files_dir: coffeescript
24
- # coffeescript_output_dir: public/js_generated
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
- # sass: true
2
- # coffee: true
3
- incloudr: true
1
+ # use_compass: true
2
+ # use_coffeescript: true
3
+ use_incloudr: true
4
4
 
5
- # # ----------------------------------------
6
- # sass_images_dir: public/images
7
- # sass_files_dir: sass
8
- # sass_output_dir: public/css_generated
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
- # compass_config: {}
14
- # compass_plugins:
15
- # - compass-capucine
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
- # sass_import_css: false
18
- # sass_import_formats: css to sass
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
- # incloudr_output_dir: public/js_generated/modules
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
- output_style = :expanded
16
+
12
17
  sass_options = {:cache => false}
13
18
 
@@ -1,30 +1,32 @@
1
- sass: true
2
- # coffee: true
3
- # incloudr: true
1
+ use_compass: true
2
+ # use_coffeescript: true
3
+ # use_incloudr: true
4
4
 
5
- # # ----------------------------------------
6
- # sass_images_dir: public/images
7
- # sass_files_dir: sass
8
- # sass_output_dir: public/css_generated
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
- # compass_config: {}
14
- # compass_plugins:
15
- # - compass-capucine
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
- # sass_import_css: false
18
- # sass_import_formats: css to sass
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, body, div, span, applet, object, iframe,
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
- a, .pressed { @include pressed-effect;}
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
- # require 'tempfile'
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
- self.conf[k] = v
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['sass_output_dir']
67
- expand_sass_in = File.join self.working_dir, self.conf['sass_files_dir']
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
- puts 'Illegal path for CoffeeScript'
71
- Process.exit
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
- puts 'Illegal path for Sass'
77
- Process.exit
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