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.
- checksums.yaml +4 -4
- data/README.md +140 -116
- metadata +4 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 905068c1d71ebf725bb4ea674447009ce8e8ea37
|
4
|
+
data.tar.gz: 4e878d00d63860408570c9448c2bb5053ab9259f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4543937826dae53a9bc558888b4f4573529da67f40c4e08f8cf3140aa1f9a410657a56b88a43135ca3d68702209da42841a556990206c71010dcde204f4b0db8
|
7
|
+
data.tar.gz: eaba1fb515be75abf5ef9c4702904dc82da93ea660459756c6837b6d13d9bc949e7fd6f91ef57e7682d1e061042be46b9351933b4928f1fccca469fdbc7ba746
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# easy-html-generator [](https://travis-ci.org/creative-workflow/easy-html-generator) [](https://codeclimate.com/github/creative-workflow/easy-html-generator)
|
1
|
+
# easy-html-generator [](https://travis-ci.org/creative-workflow/easy-html-generator) [](https://codeclimate.com/github/creative-workflow/easy-html-generator) [](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
|
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
|
92
|
+
...and navigate your web browser to `http://localhost:9292`
|
83
93
|
|
84
|
-
After a
|
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
|
-
|
129
|
-
|
130
|
-
|
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
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
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
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
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
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
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
|
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
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
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
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
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
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
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
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
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
|
-
*
|
258
|
+
* minimizes src css files and copies to dist
|
241
259
|
* config:
|
242
260
|
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
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
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
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
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
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
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
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
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
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
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
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.
|
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:
|
280
|
-
|
281
|
-
|
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:
|