easy_html_generator 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +7 -0
  2. data/CONTRIBUTING.md +44 -0
  3. data/LICENSE +22 -0
  4. data/README.md +332 -0
  5. data/bin/ehg +52 -0
  6. data/lib/easy_html_generator.rb +100 -0
  7. data/lib/easy_html_generator/checksum.rb +39 -0
  8. data/lib/easy_html_generator/config.rb +147 -0
  9. data/lib/easy_html_generator/generator.rb +25 -0
  10. data/lib/easy_html_generator/generator/base.rb +83 -0
  11. data/lib/easy_html_generator/generator/combine.rb +28 -0
  12. data/lib/easy_html_generator/generator/compile/coffee.rb +30 -0
  13. data/lib/easy_html_generator/generator/compile/haml.rb +70 -0
  14. data/lib/easy_html_generator/generator/compile/haml/context.rb +52 -0
  15. data/lib/easy_html_generator/generator/compile/haml/helper/activesupport_override.rb +48 -0
  16. data/lib/easy_html_generator/generator/compile/haml/helper/asset_helper.rb +78 -0
  17. data/lib/easy_html_generator/generator/compile/haml/layout.rb +35 -0
  18. data/lib/easy_html_generator/generator/compile/sass.rb +47 -0
  19. data/lib/easy_html_generator/generator/copy.rb +44 -0
  20. data/lib/easy_html_generator/generator/delete.rb +20 -0
  21. data/lib/easy_html_generator/generator/minimize/css.rb +28 -0
  22. data/lib/easy_html_generator/generator/minimize/html.rb +32 -0
  23. data/lib/easy_html_generator/generator/minimize/images.rb +33 -0
  24. data/lib/easy_html_generator/generator/minimize/js.rb +28 -0
  25. data/lib/easy_html_generator/generator/service/analytics.rb +34 -0
  26. data/lib/easy_html_generator/generator/service/bower.rb +34 -0
  27. data/lib/easy_html_generator/generator/service/grunt.rb +24 -0
  28. data/lib/easy_html_generator/generator/structure.rb +20 -0
  29. data/lib/easy_html_generator/generators.rb +53 -0
  30. data/lib/easy_html_generator/project.rb +77 -0
  31. data/lib/easy_html_generator/rackapp.rb +67 -0
  32. data/lib/easy_html_generator/workspace.rb +59 -0
  33. data/src/demo/assets/images/demo.png +0 -0
  34. data/src/demo/assets/public/robots.txt +0 -0
  35. data/src/demo/assets/scripts/demo.js.coffee +1 -0
  36. data/src/demo/assets/scripts/plain.js +0 -0
  37. data/src/demo/assets/styles/app.css.sass +2 -0
  38. data/src/demo/assets/styles/plain.css +0 -0
  39. data/src/demo/lib/generators/project_generator.rb +12 -0
  40. data/src/demo/lib/helper/projecthelper.rb +5 -0
  41. data/src/demo/views/index.html.haml +1 -0
  42. data/src/demo/views/index/_lore_ipsum.haml +1 -0
  43. data/src/demo/views/layout.haml +8 -0
  44. data/src/demo/views/plain.html +0 -0
  45. data/src/shared/assets/images/shared.png +0 -0
  46. data/src/shared/assets/scripts/shared.js.coffee +1 -0
  47. data/src/shared/assets/scripts/shared.plain.js +0 -0
  48. data/src/shared/assets/styles/mixins/_arrows.sass +32 -0
  49. data/src/shared/assets/styles/mixins/_bootstrap-fixes.sass +12 -0
  50. data/src/shared/assets/styles/mixins/_buttons.sass +32 -0
  51. data/src/shared/assets/styles/mixins/_css3.sass +266 -0
  52. data/src/shared/assets/styles/mixins/_headjs-bootstrap-mediaqueries.sass +42 -0
  53. data/src/shared/assets/styles/mixins/_helper.sass +70 -0
  54. data/src/shared/assets/styles/mixins/_normalize.sass +340 -0
  55. data/src/shared/assets/styles/mixins/_reset.sass +46 -0
  56. data/src/shared/lib/generators/shared_generator.rb +12 -0
  57. data/src/shared/lib/helper/shared_helper.rb +16 -0
  58. data/src/shared/project.yml +127 -0
  59. data/src/shared/views/404.yml +5 -0
  60. data/src/template/assets/public/robots.txt +0 -0
  61. data/src/template/assets/scripts/index.js.coffee +1 -0
  62. data/src/template/assets/styles/index.css.sass +2 -0
  63. data/src/template/lib/generators/project_generator.rb +12 -0
  64. data/src/template/lib/helper/project_helper.rb +5 -0
  65. data/src/template/project.yml +128 -0
  66. data/src/template/views/index.html.haml +4 -0
  67. data/src/template/views/index/_lore_ipsum.haml +2 -0
  68. data/src/template/views/layout.haml +9 -0
  69. metadata +402 -0
File without changes
@@ -0,0 +1 @@
1
+ alert 'ha'
File without changes
@@ -0,0 +1,2 @@
1
+ body
2
+ background-color: red
File without changes
@@ -0,0 +1,12 @@
1
+ # encoding: utf-8
2
+
3
+ # this generator will be loaded for this project
4
+ class EasyHtmlGenerator::Generator::ProjectGenerator <
5
+ EasyHtmlGenerator::Generator::Base
6
+
7
+ def generate
8
+ return unless @config[:enabled]
9
+
10
+ log_running
11
+ end
12
+ end
@@ -0,0 +1,5 @@
1
+ # encoding: utf-8
2
+
3
+ # this helper will be loaded into the haml render context for this project
4
+ module Projecthelper
5
+ end
@@ -0,0 +1 @@
1
+ = render_partial "index/_lore_ipsum"
@@ -0,0 +1 @@
1
+ lore ipsum
@@ -0,0 +1,8 @@
1
+ !!!
2
+ %html{lang: 'de'}
3
+ %head
4
+
5
+ %body{class: [body_class, 'loading']}
6
+ = image_tag('demo.png', width: '100', alt: 'Gear', class: 'gear')
7
+
8
+ = yield
File without changes
Binary file
@@ -0,0 +1 @@
1
+ alert 'ha'
File without changes
@@ -0,0 +1,32 @@
1
+ @mixin right-double-arrow
2
+ &:after
3
+ content: '\0000a0\00BB'
4
+
5
+ @mixin arrow-down($width: 40px, $height: 20px, $color: #000)
6
+ width: 0
7
+ height: 0
8
+ border-left: ($width / 2) solid transparent
9
+ border-right: ($width / 2) solid transparent
10
+ border-top: $height solid $color
11
+
12
+ @mixin arrow-up($width: 40px, $height: 20px, $color: #000)
13
+ width: 0
14
+ height: 0
15
+ border-left: ($width / 2) solid transparent
16
+ border-right: ($width / 2) solid transparent
17
+ border-bottom: $height solid $color
18
+
19
+ @mixin arrow-right($width: 40px, $height: 20px, $color: #000)
20
+ width: 0
21
+ height: 0
22
+ border-top: ($height / 2) solid transparent
23
+ border-bottom: ($height / 2) solid transparent
24
+ border-left: $width solid $color
25
+
26
+ @mixin arrow-left($width: 40px, $height: 20px, $color: #000)
27
+ width: 0
28
+ height: 0
29
+ border-top: ($height / 2) solid transparent
30
+ border-bottom: ($height / 2) solid transparent
31
+ border-right: $width solid $color
32
+
@@ -0,0 +1,12 @@
1
+ @import "bootstrap/variables"
2
+
3
+ @media (max-width: $screen-sm-min)
4
+ html, body
5
+ overflow-x: hidden
6
+
7
+ //remove buggy padding when using make-xs-column etc
8
+ $grid-gutter-width: 0
9
+
10
+ .form-horizontal .form-group
11
+ margin-left: 0
12
+ margin-right: 0
@@ -0,0 +1,32 @@
1
+ @mixin make-button($color: #fff, $border: 0, $start-color: #555, $end-color: #888)
2
+ cursor: pointer
3
+ text-align: center
4
+ text-decoration: none
5
+ font-size: 16px
6
+ line-height: 15px
7
+ padding: 14px 30px
8
+ border: $border
9
+ color: $color
10
+ +text-shadow(0, 1px, 1px, rgba(0,0,0,0.3))
11
+ +box-shadow(0, 0, 2px, rgba(0,0,0,0.4))
12
+ +border_radius(3px)
13
+ +inline_block
14
+ +background-gradient($start-color, $end-color)
15
+
16
+ @mixin make-red-button
17
+ +make-button(#fff, none, #c83c29, #c83c29)
18
+
19
+ @mixin make-green-button
20
+ +make-button(#fff, none, #62bc19, #49a300)
21
+
22
+ @mixin make-magenta-button
23
+ +make-button(#fff, none, #d71a9b, #be0082)
24
+
25
+ @mixin make-orange-button
26
+ +make-button(#fff, none, #f6a61a, #dd8d00)
27
+
28
+ @mixin make-blue-button
29
+ +make-button(#fff, none, #4e9df5, #3584dc)
30
+
31
+
32
+
@@ -0,0 +1,266 @@
1
+ /* -------------------------------------------------------------
2
+ * Sass CSS3 Mixins! The Cross-Browser CSS3 Sass Library
3
+ * By: Matthieu Aussaguel, http://www.mynameismatthieu.com, @matthieu_tweets
4
+ *
5
+ * List of CSS3 Sass Mixins File to be @imported and @included as you need
6
+ *
7
+ * The purpose of this library is to facilitate the use of CSS3 on different browsers avoiding HARD TO READ and NEVER
8
+ * ENDING css files
9
+ *
10
+ * note: All CSS3 Properties are being supported by Safari 5
11
+ * more info: http://www.findmebyip.com/litmus/#css3-properties
12
+ *
13
+ * Mixins available:
14
+ * - background-gradient - arguments: Start Color: #3C3C3C, End Color: #999999
15
+ * - background-size - arguments: Width: 100%, Height: 100%
16
+ * - border-radius - arguments: Radius: 5px
17
+ * - border-radius-separate - arguments: Top Left: 5px, Top Left: 5px, Bottom Left: 5px, Bottom Right: 5px
18
+ * - box - arguments: Orientation: horizontal, Pack: center, Align: center
19
+ * - box-rgba - arguments: R: 60, G: 3, B: 12, Opacity: 0.23, Color: #3C3C3C
20
+ * - box-shadow - arguments: X: 2px, Y: 2px, Blur: 5px, Color: rgba(0,0,0,.4, inset: "")
21
+ * - box-sizing - arguments: Type: border-box
22
+ * - columns - arguments: Count: 3, Gap: 10
23
+ * - double-borders - arguments: Color One: #3C3C3C, Color Two: #999999, Radius: 0
24
+ * - flex - arguments: Value: 1
25
+ * - flip - arguments: ScaleX: -1
26
+ * - font-face - arguments: Font Family: myFont, Eot File Src: myFont.eot, Woff File Src: myFont.woff, Ttf File Src: myFont.ttf
27
+ * - opacity - arguments: Opacity: 0.5
28
+ * - outline radius - arguments: Radius: 5px
29
+ * - resize - arguments: Direction: both
30
+ * - rotate - arguments: Degree: 0, M11: 0, M12: 0, M21: 0, M22: 0
31
+ * CSS Matrix Rotation Calculator http://www.boogdesign.com/examples/transforms/matrix-calculator.html
32
+ * - text-shadow - arguments: X: 2px, Y: 2px, Blur: 5px, Color: rgba(0,0,0,.4)
33
+ * - transform - arguments: Parameters: null
34
+ * - transition - arguments: What: all, Length: 1s, Easing: ease-in-out
35
+ * - triple-borders - arguments: Color One: #3C3C3C, Color Two: #999999, Color Three: #000000, Radius: 0
36
+ *
37
+ *-------------------------------------------------------------*/
38
+
39
+ /* BACKGROUND GRADIENT */
40
+ @mixin background-gradient($startColor: #3C3C3C, $endColor: #999999)
41
+ background-color: $startColor
42
+ background-image: -webkit-gradient(linear, left top, left bottom, from($startColor), to($endColor))
43
+ background-image: -webkit-linear-gradient(top, $startColor, $endColor)
44
+ background-image: -moz-linear-gradient(top, $startColor, $endColor)
45
+ background-image: -ms-linear-gradient(top, $startColor, $endColor)
46
+ background-image: -o-linear-gradient(top, $startColor, $endColor)
47
+ background-image: linear-gradient(top, $startColor, $endColor)
48
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#{$startColor}', endColorStr='#{$endColor}')
49
+
50
+
51
+ /* BACKGROUND SIZE */
52
+ @mixin background-size($width: 100%, $height: 100%)
53
+ -moz-background-size: $width $height
54
+ -webkit-background-size: $width $height
55
+ background-size: $width $height
56
+
57
+
58
+ /* BORDER RADIUS */
59
+ @mixin border-radius($radius: 5px)
60
+ -moz-border-radius: $radius
61
+ -webkit-border-radius: $radius
62
+ border-radius: $radius
63
+
64
+ @mixin border-radius-separate($topLeftRadius: 5px, $topRightRadius: 5px, $bottomLeftRadius: 5px, $bottomRightRadius: 5px)
65
+ -webkit-border-top-left-radius: $topLeftRadius
66
+ -webkit-border-top-right-radius: $topRightRadius
67
+ -webkit-border-bottom-right-radius: $bottomRightRadius
68
+ -webkit-border-bottom-left-radius: $bottomLeftRadius
69
+
70
+ -moz-border-radius-topleft: $topLeftRadius
71
+ -moz-border-radius-topright: $topRightRadius
72
+ -moz-border-radius-bottomright: $bottomRightRadius
73
+ -moz-border-radius-bottomleft: $bottomLeftRadius
74
+
75
+ border-top-left-radius: $topLeftRadius
76
+ border-top-right-radius: $topRightRadius
77
+ border-bottom-right-radius: $bottomRightRadius
78
+ border-bottom-left-radius: $bottomLeftRadius
79
+
80
+ /* BOX */
81
+ @mixin box($orient: horizontal, $pack: center, $align: center)
82
+ display: -webkit-box
83
+ display: -moz-box
84
+ display: box
85
+
86
+ -webkit-box-orient: $orient
87
+ -moz-box-orient: $orient
88
+ box-orient: $orient
89
+
90
+ -webkit-box-pack: $pack
91
+ -moz-box-pack: $pack
92
+ box-pack: $pack
93
+
94
+ -webkit-box-align: $align
95
+ -moz-box-align: $align
96
+ box-align: $align
97
+
98
+ /* BOX RGBA */
99
+ @mixin box-rgba($r: 60, $g: 3, $b: 12, $opacity: 0.23, $color: #3C3C3C)
100
+ background-color: transparent
101
+ background-color: rgba($r, $g, $b, $opacity)
102
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$color}',endColorstr='#{$color}')
103
+ zoom: 1
104
+
105
+
106
+ /* BOX SHADOW */
107
+ @mixin box-shadow($x: 2px, $y: 2px, $blur: 5px, $color: rgba(0,0,0,.4), $inset: "")
108
+ @if ($inset != "")
109
+ -webkit-box-shadow: $inset $x $y $blur $color
110
+ -moz-box-shadow: $inset $x $y $blur $color
111
+ box-shadow: $inset $x $y $blur $color
112
+ @else
113
+ -webkit-box-shadow: $x $y $blur $color
114
+ -moz-box-shadow: $x $y $blur $color
115
+ box-shadow: $x $y $blur $color
116
+
117
+ /* BOX SIZING */
118
+ @mixin box-sizing($type: border-box)
119
+ -webkit-box-sizing: $type
120
+ -moz-box-sizing: $type
121
+ box-sizing: $type
122
+
123
+ /* COLUMNS */
124
+ @mixin columns($count: 3, $gap: 10)
125
+ -webkit-column-count: $count
126
+ -moz-column-count: $count
127
+ column-count: $count
128
+
129
+ -webkit-column-gap: $gap
130
+ -moz-column-gap: $gap
131
+ column-gap: $gap
132
+
133
+ /* DOUBLE BORDERS */
134
+ @mixin double-borders($colorOne: #3C3C3C, $colorTwo: #999999, $radius: 0)
135
+ border: 1px solid $colorOne
136
+
137
+ -webkit-box-shadow: 0 0 0 1px $colorTwo
138
+ -moz-box-shadow: 0 0 0 1px $colorTwo
139
+ box-shadow: 0 0 0 1px $colorTwo
140
+
141
+ @include border-radius( $radius )
142
+
143
+ /* FLEX */
144
+ @mixin flex($value: 1)
145
+ -webkit-box-flex: $value
146
+ -moz-box-flex: $value
147
+ box-flex: $value
148
+
149
+ /* FLIP */
150
+ @mixin flip($scaleX: -1)
151
+ -moz-transform: scaleX($scaleX)
152
+ -o-transform: scaleX($scaleX)
153
+ -webkit-transform: scaleX($scaleX)
154
+ transform: scaleX($scaleX)
155
+ filter: FlipH
156
+ -ms-filter: "FlipH"
157
+
158
+ /* FONT FACE */
159
+ @mixin font-face($fontFamily: myFont, $eotFileSrc: 'myFont.eot', $woffFileSrc: 'myFont.woff', $ttfFileSrc: 'myFont.ttf')
160
+ font-family: $fontFamily
161
+ src: url($eotFileSrc) format('eot'), url($woffFileSrc) format('woff'), url($ttfFileSrc) format('truetype')
162
+
163
+ /* OPACITY */
164
+ @mixin opacity($opacity: 0.5)
165
+ filter: alpha(opacity=($opacity * 100))
166
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=" + ($opacity * 100) + ")"
167
+ -moz-opacity: $opacity
168
+ -khtml-opacity: $opacity
169
+ opacity: $opacity
170
+
171
+
172
+ /* OUTLINE RADIUS */
173
+ @mixin outline-radius($radius: 5px)
174
+ -webkit-outline-radius: $radius
175
+ -moz-outline-radius: $radius
176
+ outline-radius: $radius
177
+
178
+ /* RESIZE */
179
+ @mixin resize($direction: both)
180
+ -webkit-resize: $direction
181
+ -moz-resize: $direction
182
+ resize: $direction
183
+
184
+ /* ROTATE*/
185
+ @mixin rotate($deg: 0, $m11: 0, $m12: 0, $m21: 0, $m22: 0)
186
+ -moz-transform: rotate($deg + deg)
187
+ -o-transform: rotate($deg + deg)
188
+ -webkit-transform: rotate($deg + deg)
189
+ -ms-transform: rotate($deg + deg)
190
+ transform: rotate($deg + deg)
191
+ filter: progid:DXImageTransform.Microsoft.Matrix(M11=#{$m11}, M12=#{$m12}, M21=#{$m21}, M22=#{$m22}, sizingMethod='auto expand')
192
+ zoom: 1
193
+
194
+ /* TEXT SHADOW */
195
+ @mixin text-shadow($x: 2px, $y: 2px, $blur: 5px, $color: rgba(0,0,0,.4))
196
+ text-shadow: $x $y $blur $color
197
+
198
+ /* TRANSFORM */
199
+ @mixin transform($params)
200
+ -webkit-transform: $params
201
+ -moz-transform: $params
202
+ transform: $params
203
+
204
+ /* TRANSITION */
205
+ @mixin transition($what: all, $length: 1s, $easing: ease-in-out)
206
+ -moz-transition: $what $length $easing
207
+ -o-transition: $what $length $easing
208
+ -webkit-transition: $what $length $easing
209
+ -ms-transition: $what $length $easing
210
+ transition: $what $length $easing
211
+
212
+ @mixin multi-transition($args...)
213
+ -moz-transition: $args
214
+ -o-transition: $args
215
+ -webkit-transition: $args
216
+ -ms-transition: $args
217
+ transition: $args
218
+
219
+ @mixin transform-transition($length, $easing: linear)
220
+ -moz-transition: -moz-transform $length $easing
221
+ -o-transition: -o-transform $length $easing
222
+ -webkit-transition: -webkit-transform $length $easing
223
+ -ms-transition: -ms-transform $length $easing
224
+ transition: transform $length $easing
225
+
226
+ @mixin transition-timing($timing_function)
227
+ -webkit-transition-timing-function: $timing_function
228
+ -moz-transition-timing-function: $timing_function
229
+ -o-transition-timing-function: $timing_function
230
+ transition-timing-function: $timing_function
231
+
232
+ @mixin backface-visibility($what)
233
+ backface-visibility: $what
234
+ -moz-backface-visibility: $what
235
+ -webkit-backface-visibility: $what
236
+
237
+
238
+ /* TRIPLE BORDERS */
239
+ @mixin triple-borders($colorOne: #3C3C3C, $colorTwo: #999999, $colorThree: #000000, $radius: 0)
240
+ border: 1px solid $colorOne
241
+
242
+ @include border-radius($radius)
243
+
244
+ -webkit-box-shadow: 0 0 0 1px $colorTwo, 0 0 0 2px $colorThree
245
+ -moz-box-shadow: 0 0 0 1px $colorTwo, 0 0 0 2px $colorThree
246
+ box-shadow: 0 0 0 1px $colorTwo, 0 0 0 2px $colorThree
247
+
248
+ @mixin filter($what)
249
+ filter: $what
250
+ -moz-filter: $what
251
+ -webkit-filter: $what
252
+
253
+ @mixin perspective($value)
254
+ perspective: $value
255
+ -moz-perspective: $value
256
+ -webkit-perspective: $value
257
+
258
+ @mixin transform-style($value)
259
+ transform-style: $value
260
+ -moz-transform-style: $value
261
+ -webkit-transform-style: $value
262
+
263
+ @mixin gradient-vertical-three-colors-no-filter($start-color, $mid-color, $color-stop, $end-color)
264
+ background-image: -webkit-linear-gradient($start-color, $mid-color $color-stop, $end-color)
265
+ background-image: linear-gradient($start-color, $mid-color $color-stop, $end-color)
266
+ background-repeat: no-repeat
@@ -0,0 +1,42 @@
1
+
2
+ // min-width: $screen-xs
3
+ // html.gte-480
4
+ @mixin min-width-xs
5
+ html.gte-480 &
6
+ @content
7
+
8
+ // max-width: $screen-xs
9
+ // html.lte-480
10
+ @mixin max-width-xs
11
+ html.lt-768 &
12
+ @content
13
+
14
+ // min-width: $screen-sm
15
+ // html.gte-768
16
+ @mixin min-width-sm
17
+ html.gte-768 &
18
+ @content
19
+
20
+ // max-width: $screen-sm
21
+ // html.lte-768
22
+ @mixin max-width-sm
23
+ html.lt-992 &
24
+ @content
25
+
26
+ // min-width: $screen-md
27
+ // html.gte-992
28
+ @mixin min-width-md
29
+ html.gte-992 &
30
+ @content
31
+
32
+ // max-width: $screen-md
33
+ // html.lte-992
34
+ @mixin max-width-md
35
+ html.lt-1200 &
36
+ @content
37
+
38
+ // min-width: $screen-lg
39
+ // html.gte-1200
40
+ @mixin min-width-lg
41
+ html.gte-1200 &
42
+ @content