easy_html_generator 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +140 -116
  3. metadata +4 -23
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bbf67d8cf7bfda5daf5f4921a24c1ba0715c3c87
4
- data.tar.gz: 4305ffba33eb60ee1ca3aff1d560632dd99e5ab1
3
+ metadata.gz: 905068c1d71ebf725bb4ea674447009ce8e8ea37
4
+ data.tar.gz: 4e878d00d63860408570c9448c2bb5053ab9259f
5
5
  SHA512:
6
- metadata.gz: 4386a2e634b820b4cc97cd8dbfbf0e6ae40916db22736f7d86418f85b19459c7ba18e884ebb2c83cdcc86dae244c8894be5f6ea01aa69b1506e38ce630077111
7
- data.tar.gz: 3819e7952489e72af72bbacd050f4de9a2ea9f54a2be2f5a4932ec35872492c6eb1be93f922aea2caf4b106b164dafff0e022bc8e04dbd02b3827e2139b6bb49
6
+ metadata.gz: 4543937826dae53a9bc558888b4f4573529da67f40c4e08f8cf3140aa1f9a410657a56b88a43135ca3d68702209da42841a556990206c71010dcde204f4b0db8
7
+ data.tar.gz: eaba1fb515be75abf5ef9c4702904dc82da93ea660459756c6837b6d13d9bc949e7fd6f91ef57e7682d1e061042be46b9351933b4928f1fccca469fdbc7ba746
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # easy-html-generator [![Build Status](https://travis-ci.org/creative-workflow/easy-html-generator.svg?branch=master)](https://travis-ci.org/creative-workflow/easy-html-generator) [![Code Climate](https://codeclimate.com/github/creative-workflow/easy-html-generator/badges/gpa.svg)](https://codeclimate.com/github/creative-workflow/easy-html-generator)
1
+ # easy-html-generator [![Build Status](https://travis-ci.org/creative-workflow/easy-html-generator.svg?branch=master)](https://travis-ci.org/creative-workflow/easy-html-generator) [![Code Climate](https://codeclimate.com/github/creative-workflow/easy-html-generator/badges/gpa.svg)](https://codeclimate.com/github/creative-workflow/easy-html-generator) [![Gem Version](https://badge.fury.io/rb/easy_html_generator.svg)](http://badge.fury.io/rb/easy_html_generator)
2
2
 
3
3
  This gem is a powerful and easy to use web development tool that helps developing modern web sites by generating static html pages. It uses:
4
4
  * [CoffeScript](http://coffeescript.org/) aka Javascript
@@ -6,13 +6,14 @@ This gem is a powerful and easy to use web development tool that helps developin
6
6
  * [Haml](http://haml.info/) aka html
7
7
  * [ActionView](https://github.com/rails/rails/tree/master/actionview) for ruby haml templating comfort
8
8
 
9
- It can utilizes:
9
+ It utilizes:
10
10
  * [Bootstrap](http://getbootstrap.com/) for responsive and modern html layouts
11
11
  * [HeadJS](http://headjs.com/) for performance optimized resource loading
12
12
  * [Bower](http://bower.io/) for javascript dependency management
13
13
  * [Grunt](http://gruntjs.com/) for javascript based task management
14
14
  * [Google Anlaytics](https://www.google.com/analytics/) tracking of pageclicks
15
15
  * minimizing from coffee-, javascript-, sass-, css-, png- and image-files
16
+ * ~ 600 lines of code
16
17
 
17
18
  It is developed with:
18
19
  - [Ruby](https://www.ruby-lang.org/) as implementation language
@@ -24,6 +25,14 @@ It is based on:
24
25
 
25
26
  ## Basic concepts
26
27
  ### setup
28
+ You have to install the following software if you want to use specific generators:
29
+ * [OptiPng](http://optipng.sourceforge.net/) for png image minimizing
30
+ * [JpegOptim](https://github.com/tjko/jpegoptim) for jpg image minimizing
31
+ * [Bundler](http://bundler.io/) to use the easy_html_generator gem
32
+ * [NodeJs](https://nodejs.org/download/) to use bower and grunt https://www.npmjs.com/
33
+ * [Bower](http://bower.io/) to use bower `npm install -g bower`
34
+ * [Grunt](http://gruntjs.com/getting-started) to use grunt `npm install -g grunt-cli`
35
+
27
36
  Create a new project folder
28
37
 
29
38
  mkdir my_project
@@ -77,11 +86,12 @@ Now you should see the following folder sructure
77
86
  ├── project.yml # if a project doesnt have a `project.yml` this config will be used
78
87
 
79
88
  Now run
89
+
80
90
  ehg --server
81
91
 
82
- ...and go to `http://localhost:9292`
92
+ ...and navigate your web browser to `http://localhost:9292`
83
93
 
84
- After a sort time of generating you should see a directory listening in your browser.
94
+ After a short time of generating you should see a directory listening in your browser.
85
95
 
86
96
  ## Usage terminal
87
97
  Usage: ehg [options]
@@ -99,7 +109,7 @@ There are several generators controlled by the `project.yml` configured like:
99
109
  images: 'assets/images'
100
110
  scripts: 'assets/scripts'
101
111
  styles: 'assets/styles'
102
- ...
112
+ ...
103
113
 
104
114
  generators:
105
115
  - structure:
@@ -114,6 +124,7 @@ There are several generators controlled by the `project.yml` configured like:
114
124
  enabled: true
115
125
  selector: 'bower.json'
116
126
  target: 'lib'
127
+ ...
117
128
 
118
129
  ## Generators
119
130
  Generators are processed the way they appear in the `project.yml`. At the moment only one generator instance per `project.yml` is allowed. Every generator has the property `enabled`.
@@ -124,103 +135,109 @@ Generators are processed the way they appear in the `project.yml`. At the moment
124
135
  * creates necessary dist folders
125
136
  * config:
126
137
 
127
-
128
- generators:
129
- - structure:
130
- enabled: true
138
+ ```
139
+ generators:
140
+ - structure:
141
+ enabled: true
142
+ ```
131
143
 
132
144
  #### Copy
133
145
  * operates on: `dist` and `src`
134
146
  * copies folder or files from dist to src
135
147
  * config:
136
148
 
137
-
138
- generators:
139
- - copy:
140
- enabled: true
141
- dirs:
142
- -
143
- source: 'assets/styles'
144
- target: 'styles'
145
- selector: '**/*.css'
146
- -
147
- source: 'assets/scripts'
148
- target: 'scripts'
149
- selector: '**/*.js'
149
+ ```
150
+ generators:
151
+ - copy:
152
+ enabled: true
153
+ dirs:
154
+ -
155
+ source: 'assets/styles'
156
+ target: 'styles'
157
+ selector: '**/*.css'
158
+ -
159
+ source: 'assets/scripts'
160
+ target: 'scripts'
161
+ selector: '**/*.js'
162
+ ```
150
163
 
151
164
  #### Combine
152
165
  * operates on: `dist`
153
166
  * combines merges files on dist
154
167
  * config:
155
168
 
156
-
157
- generators:
158
- - combine
159
- enabled: true
160
- packages:
161
- -
162
- file: 'scripts/combined.js'
163
- files:
164
- - 'scripts/**/*.js'
165
- -
166
- file: 'styles/combined.css'
167
- files:
168
- - 'styles/**/*.css'
169
+ ```
170
+ generators:
171
+ - combine
172
+ enabled: true
173
+ packages:
174
+ -
175
+ file: 'scripts/combined.js'
176
+ files:
177
+ - 'scripts/**/*.js'
178
+ -
179
+ file: 'styles/combined.css'
180
+ files:
181
+ - 'styles/**/*.css'
182
+ ```
169
183
 
170
184
  #### Delete
171
185
  * operates on: `dist`
172
186
  * deletes files or folders on dist
173
187
  * config:
174
188
 
175
-
176
- generators:
177
- - delete
178
- enabled: false
179
- files:
180
- - '*'
181
-
189
+ ```
190
+ generators:
191
+ - delete
192
+ enabled: false
193
+ files:
194
+ - '*'
195
+ ```
182
196
 
183
197
  ### Complie-Generators
184
198
  #### Compile::Haml
185
199
  * operates on: `dist` and `src`
186
- * compiles haml files from src to html files in dist, supports partials and action view, supports minimizing
200
+ * compiles haml files from src to html files in dist, supports partials, action view syntax and minimizing
187
201
  * config:
188
202
 
189
-
190
- generators:
191
- - compile_haml:
192
- enabled: true
193
- minimize: true
194
- default_layout: 'views/layout.haml'
195
- selector: '**/*.html.haml'
196
- renderer:
197
- attr_wrapper: '"'
198
- format: :html5
199
- shared_helper_path: 'shared/lib'
203
+ ```
204
+ generators:
205
+ - compile_haml:
206
+ enabled: true
207
+ minimize: true
208
+ default_layout: 'views/layout.haml'
209
+ selector: '**/*.html.haml'
210
+ renderer:
211
+ attr_wrapper: '"'
212
+ format: :html5
213
+ shared_helper_path: 'shared/lib'
214
+ ```
200
215
 
201
216
  #### Compile::Sass
202
217
  * operates on: `dist` and `src`
203
218
  * compiles sass files from src to css files in dist, supports shared mixins and minimizing
204
219
  * config:
205
220
 
206
-
207
- generators:
208
- - compile_sass:
209
- enabled: true
210
- minimize: true
211
- selector: '**/*.css.sass'
221
+ ```
222
+ generators:
223
+ - compile_sass:
224
+ enabled: true
225
+ minimize: true
226
+ selector: '**/*.css.sass'
227
+ ```
212
228
 
213
229
  #### Compile::Coffee
214
230
  * operates on: `dist` and `src`
215
231
  * compiles coffee files from src to js files in dist, supports minimizing
216
232
  * config:
217
233
 
218
-
219
- generators:
220
- - compile_coffee:
221
- enabled: true
222
- minimize: true
223
- selector: '**/*.js.coffee'
234
+ ```
235
+ generators:
236
+ - compile_coffee:
237
+ enabled: true
238
+ minimize: true
239
+ selector: '**/*.js.coffee'
240
+ ```
224
241
 
225
242
  ### Minimize-Generators
226
243
  #### Minimize::Html
@@ -228,52 +245,55 @@ Generators are processed the way they appear in the `project.yml`. At the moment
228
245
  * minimizes src html files and copies to dist
229
246
  * config:
230
247
 
231
-
232
- generators:
233
- - minimize_html:
234
- enabled: true
235
- selector: '**/*.html'
236
- prefix_extension: ''
248
+ ```
249
+ generators:
250
+ - minimize_html:
251
+ enabled: true
252
+ selector: '**/*.html'
253
+ prefix_extension: ''
254
+ ```
237
255
 
238
256
  #### Minimize::Css
239
257
  * operates on: `dist` and `src`
240
- * cminimizes src css files and copies to dist
258
+ * minimizes src css files and copies to dist
241
259
  * config:
242
260
 
243
-
244
- generators:
245
- - minimize_css:
246
- enabled: true
247
- selector: '**/*.css'
248
- prefix_extension: '.min'
261
+ ```
262
+ generators:
263
+ - minimize_css:
264
+ enabled: true
265
+ selector: '**/*.css'
266
+ prefix_extension: '.min'
267
+ ```
249
268
 
250
269
  #### Minimize::Js
251
270
  * operates on: `dist` and `src`
252
271
  * minimizes src js files and copies to dist
253
272
  * config:
254
273
 
255
-
256
- generators:
257
- - minimize_js:
258
- enabled: true
259
- selector: '**/*.js'
260
- prefix_extension: '.min'
274
+ ```
275
+ generators:
276
+ - minimize_js:
277
+ enabled: true
278
+ selector: '**/*.js'
279
+ prefix_extension: '.min'
280
+ ```
261
281
 
262
282
  #### Minimize::Images
263
283
  * operates on: `dist` and `src`
264
284
  * minimizes src image files and copies to dist, uses [Piet](https://github.com/albertbellonch/piet)
265
285
  * config:
266
286
 
267
-
268
- generators:
269
- - minimize_images:
270
- enabled: true
271
- selector: '**/*.{jpg,jpeg,png}'
272
- options:
273
- quality: 90
274
- level: 3
275
- verbose: true
276
-
287
+ ```
288
+ generators:
289
+ - minimize_images:
290
+ enabled: true
291
+ selector: '**/*.{jpg,jpeg,png}'
292
+ options:
293
+ quality: 90
294
+ level: 3
295
+ verbose: true
296
+ ```
277
297
 
278
298
  ### Service-Generators
279
299
  #### Service::Bower
@@ -281,24 +301,26 @@ Generators are processed the way they appear in the `project.yml`. At the moment
281
301
  * resolves my_project/bower.json and copies bower_components to target in dist
282
302
  * config:
283
303
 
284
-
285
- generators:
286
- - service_bower:
287
- enabled: true
288
- selector: 'bower.json'
289
- target: 'lib'
304
+ ```
305
+ generators:
306
+ - service_bower:
307
+ enabled: true
308
+ selector: 'bower.json'
309
+ target: 'lib'
310
+ ```
290
311
 
291
312
  #### Service::Grunt
292
313
  * operates on: `dist`
293
314
  * resolves my_project/Gruntfile.coffee and runs a task
294
315
  * config:
295
316
 
296
-
297
- generators:
298
- - service_grunt:
299
- enabled: true
300
- selector: 'Gruntfile.coffee'
301
- task: 'default'
317
+ ```
318
+ generators:
319
+ - service_grunt:
320
+ enabled: true
321
+ selector: 'Gruntfile.coffee'
322
+ task: 'default'
323
+ ```
302
324
 
303
325
  #### Service::Analytics
304
326
  * operates on: `dist`
@@ -306,15 +328,17 @@ Generators are processed the way they appear in the `project.yml`. At the moment
306
328
  * config:
307
329
 
308
330
 
309
- generators:
310
- - service_analytics:
311
- enabled: true
312
- append_to_files:
313
- - '**/*.html'
314
- google:
315
- enabled: true
316
- code: "<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', '{GOOGLE_UA_ID}', 'auto');ga('send', 'pageview');</script>"
317
- id: -1
331
+ ```
332
+ generators:
333
+ - service_analytics:
334
+ enabled: true
335
+ append_to_files:
336
+ - '**/*.html'
337
+ google:
338
+ enabled: true
339
+ code: "<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', '{GOOGLE_UA_ID}', 'auto');ga('send', 'pageview');</script>"
340
+ id: -1
341
+ ```
318
342
 
319
343
  ### Resources
320
344
  * https://github.com/dennisvandehoef/easy-html-creator
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy_html_generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Hanoldt
@@ -276,28 +276,9 @@ dependencies:
276
276
  - - ">="
277
277
  - !ruby/object:Gem::Version
278
278
  version: '0'
279
- description: |2-
280
- It uses:
281
- * CoffeScript aka Javascript
282
- * Sass aka css
283
- * Haml aka html
284
- * ActionView for ruby haml templating comfort
285
-
286
- It can utilizes:
287
- * Bootstrap for responsive and modern html layouts
288
- * HeadJ for performance optimized resource loading
289
- * Bower for javascript dependency management
290
- * Grunt for javascript based task management
291
- * Google Anlaytics for tracking of pageclicks
292
- * minimizing from coffee-, javascript-, sass-, css-, png- and image-files
293
-
294
- It is developed with:
295
- - Rspec for testing
296
- - RuboCop for code quality
297
- - Rack as Server
298
-
299
- It is based on:
300
- - EasyHtmlCreator (https://github.com/dennisvandehoef/easy-html-creator)
279
+ description: |-
280
+ This gem is a powerful and easy to use web development tool that helps developing modern web sites by generating static html pages.
281
+ It uses CoffeScript, Sass, Haml, Bootstrap, HeadJs, Bower, Grunt, Google Anlaytics and minimizes coffee-, javascript-, sass-, css-, png- and image-files.
301
282
  email:
302
283
  - monotom@gmail.com
303
284
  executables: