easy_html_generator 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CONTRIBUTING.md +3 -27
- data/README.md +57 -53
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 875237a17ac5b7d76c3cb441fd2a7e896864f464
|
4
|
+
data.tar.gz: 2bff580b44cbc05125ac28f6d3936c190b885ff7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7bed40940a5329e3669605abd96e37bbe6d28cc2ececcda8f88c5fc224daf9b44d6ccf15873247b083971ec8a4300fbe40b6e12e3f4a5296ed6e4e608c1d501
|
7
|
+
data.tar.gz: 1704ff7de57756fef01cf1388eafb55fa1ace160a61399261f13fd698ccee0150991ed861189f19e2ea7ec514d27f43b448d82a442c05ceb09a9ef0a56e073d7
|
data/CONTRIBUTING.md
CHANGED
@@ -10,35 +10,11 @@
|
|
10
10
|
|
11
11
|
## Development
|
12
12
|
|
13
|
-
###Tools
|
13
|
+
### Tools
|
14
14
|
We use the following tools for development:
|
15
|
-
|
16
15
|
- [RSpec](http://rspec.info/) for tests.
|
17
16
|
- [Rake](https://github.com/ruby/rake) for task management.
|
18
17
|
- [RuboCop](https://github.com/bbatsov/rubocop) for code quality.
|
19
|
-
- [NodeJS](http://nodejs.org/download/) required to run grunt.
|
20
|
-
- [Grunt](http://gruntjs.com/getting-started) for task management inside a project.
|
21
|
-
- [Bower](http://bower.io/#getting-started) for js dependency management inside a project.
|
22
|
-
|
23
|
-
###Getting started
|
24
|
-
Install [NodeJS](http://nodejs.org/).
|
25
|
-
Install globally grunt-cli using the following command:
|
26
|
-
|
27
|
-
$ npm install -g grunt-cli
|
28
|
-
|
29
|
-
Browse to the project root directory and install the dev dependencies:
|
30
|
-
|
31
|
-
$ npm install -d
|
32
|
-
|
33
|
-
To execute the build and tests run the following command in the root of the project:
|
34
|
-
|
35
|
-
$ grunt
|
36
|
-
|
37
|
-
You should see a green message in the console:
|
38
|
-
|
39
|
-
Done, without errors.
|
40
|
-
|
41
|
-
###testing
|
42
|
-
You can run the tests with using the following command:
|
43
18
|
|
44
|
-
|
19
|
+
### Documentation
|
20
|
+
http://www.rubydoc.info/gems/easy_html_generator/
|
data/README.md
CHANGED
@@ -1,19 +1,21 @@
|
|
1
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
|
-
This gem is a powerful and easy to use web development tool that helps developing modern web sites by generating static html pages. It
|
4
|
-
* [CoffeScript](http://coffeescript.org/)
|
5
|
-
* [Sass](http://sass-lang.com/)
|
6
|
-
* [Haml](http://haml.info/)
|
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 utilizes:
|
4
|
+
* [CoffeScript](http://coffeescript.org/) a.k.a. Javascript
|
5
|
+
* [Sass](http://sass-lang.com/) a.k.a. Css
|
6
|
+
* [Haml](http://haml.info/) a.k.a. Html
|
7
7
|
* [ActionView](https://github.com/rails/rails/tree/master/actionview) for ruby haml templating comfort
|
8
|
+
* ~ 600 lines of code
|
8
9
|
|
9
|
-
It
|
10
|
+
It supports:
|
10
11
|
* [Bootstrap](http://getbootstrap.com/) for responsive and modern html layouts
|
11
12
|
* [HeadJS](http://headjs.com/) for performance optimized resource loading
|
12
13
|
* [Bower](http://bower.io/) for javascript dependency management
|
13
14
|
* [Grunt](http://gruntjs.com/) for javascript based task management
|
14
15
|
* [Google Anlaytics](https://www.google.com/analytics/) tracking of pageclicks
|
15
|
-
* minimizing
|
16
|
-
*
|
16
|
+
* minimizing of coffee-, javascript-, sass-, css-, png- and jpg files
|
17
|
+
* per project generators and ruby/haml view helper
|
18
|
+
* shared generators, helpers, static-, sass- and image files
|
17
19
|
|
18
20
|
It is developed with:
|
19
21
|
- [Ruby](https://www.ruby-lang.org/) as implementation language
|
@@ -23,26 +25,26 @@ It is developed with:
|
|
23
25
|
It is based on:
|
24
26
|
- [EasyHtmlCreator](https://github.com/dennisvandehoef/easy-html-creator) which was the fundament [Dennis van de Hoef](https://github.com/dennisvandehoef) and me developed on.
|
25
27
|
|
26
|
-
##
|
27
|
-
|
28
|
-
|
28
|
+
## Get started
|
29
|
+
At first you need [Ruby](https://www.ruby-lang.org/de/) and [Bundler](http://bundler.io/).
|
30
|
+
|
31
|
+
For specific generators install:
|
29
32
|
* [OptiPng](http://optipng.sourceforge.net/) for png image minimizing
|
30
33
|
* [JpegOptim](https://github.com/tjko/jpegoptim) for jpg image minimizing
|
31
|
-
* [Bundler](http://bundler.io/) to use the easy_html_generator gem
|
32
34
|
* [NodeJs](https://nodejs.org/download/) to use bower and grunt https://www.npmjs.com/
|
33
35
|
* [Bower](http://bower.io/) to use bower `npm install -g bower`
|
34
36
|
* [Grunt](http://gruntjs.com/getting-started) to use grunt `npm install -g grunt-cli`
|
35
37
|
|
36
|
-
Create a new
|
38
|
+
Create a new workspace folder
|
37
39
|
|
38
|
-
mkdir
|
39
|
-
cd
|
40
|
+
mkdir my_workspace
|
41
|
+
cd my_workspace
|
40
42
|
|
41
|
-
Create a ruby
|
43
|
+
Create a ruby `Gemfile`
|
42
44
|
|
43
45
|
touch Gemfile
|
44
46
|
|
45
|
-
Paste this into the
|
47
|
+
Paste this into the `Gemfile`
|
46
48
|
|
47
49
|
source 'https://rubygems.org'
|
48
50
|
|
@@ -54,36 +56,37 @@ Run in terminal
|
|
54
56
|
ehg --init
|
55
57
|
ehg --create my_project
|
56
58
|
|
57
|
-
Now you should see the following folder
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
59
|
+
Now you should see the following folder structure with `ls -alR`
|
60
|
+
|
61
|
+
my_workspace
|
62
|
+
├── dist # the generated result will be stored here
|
63
|
+
└── src # the generation input is stored here
|
64
|
+
├── demo
|
65
|
+
├── my_project # this is a project and will be available via http://localhost:9292/my_project
|
66
|
+
│ ├── assets
|
67
|
+
│ │ ├── images # content will be copied to `dist/my_project/images`
|
68
|
+
│ │ ├── public # public content gets directly copied to `dist/my_project/`
|
69
|
+
│ │ ├── scripts # content will be copied to `dist/my_project/scripts`
|
70
|
+
│ │ └── styles # content will be copied to `dist/my_project/styles`
|
71
|
+
│ ├── lib
|
72
|
+
│ │ ├── generators # project specific generators
|
73
|
+
│ │ └── helper # project specific view helpers you can use in haml files
|
74
|
+
│ ├── project.yml # project specific generators config
|
75
|
+
│ └── views
|
76
|
+
│ ├── index.html.haml # the ham file for index.html
|
77
|
+
│ └── layout.haml # the layout file index.html will use
|
78
|
+
|
|
79
|
+
└── shared # shared content over all projects
|
80
|
+
├── assets # shared assets over all projects
|
81
|
+
│ ├── images
|
82
|
+
│ ├── public
|
83
|
+
│ ├── scripts
|
84
|
+
│ └── styles
|
85
|
+
│ └── mixins # here are css helpers for bootstrap and head js
|
86
|
+
├── lib
|
87
|
+
│ ├── generators # generators shared over all projects
|
88
|
+
│ └── helper # view helpers you can use in haml files
|
89
|
+
└── project.yml # if a project doesnt have a `project.yml` this config will be used
|
87
90
|
|
88
91
|
Now run
|
89
92
|
|
@@ -93,16 +96,16 @@ Now run
|
|
93
96
|
|
94
97
|
After a short time of generating you should see a directory listening in your browser.
|
95
98
|
|
96
|
-
## Usage
|
99
|
+
## Usage Terminal
|
97
100
|
Usage: ehg [options]
|
98
101
|
-s, --server [HOST_AND_PORT] start the rack server, default: 0.0.0.0:9292
|
99
102
|
-g, --generate [PROJECT] generate one or all projects, default: all
|
100
|
-
-i, --init
|
103
|
+
-i, --init initialize ehg workspace
|
101
104
|
-c, --create [PROJECT] create a new project from template, default: demo
|
102
105
|
-h, --help Show this message
|
103
106
|
|
104
107
|
## Usage Generators
|
105
|
-
There are several generators controlled by the `project.yml`
|
108
|
+
There are several generators controlled by the `project.yml`. If a project misses the project.yml the file `my_workspace/shared/project.yml` will be loaded and looks like this:
|
106
109
|
|
107
110
|
paths:
|
108
111
|
src:
|
@@ -194,7 +197,7 @@ generators:
|
|
194
197
|
- '*'
|
195
198
|
```
|
196
199
|
|
197
|
-
###
|
200
|
+
### Compile-Generators
|
198
201
|
#### Compile::Haml
|
199
202
|
* operates on: `dist` and `src`
|
200
203
|
* compiles haml files from src to html files in dist, supports partials, action view syntax and minimizing
|
@@ -298,7 +301,7 @@ generators:
|
|
298
301
|
### Service-Generators
|
299
302
|
#### Service::Bower
|
300
303
|
* operates on: `dist` and `src`
|
301
|
-
* resolves
|
304
|
+
* resolves my_workspace/bower.json and copies bower_components to target in dist
|
302
305
|
* config:
|
303
306
|
|
304
307
|
```
|
@@ -311,7 +314,7 @@ generators:
|
|
311
314
|
|
312
315
|
#### Service::Grunt
|
313
316
|
* operates on: `dist`
|
314
|
-
* resolves
|
317
|
+
* resolves my_workspace/Gruntfile.coffee and runs a task
|
315
318
|
* config:
|
316
319
|
|
317
320
|
```
|
@@ -341,11 +344,12 @@ generators:
|
|
341
344
|
```
|
342
345
|
|
343
346
|
### Resources
|
344
|
-
* https://github.com/dennisvandehoef/easy-html-creator
|
345
347
|
* https://github.com/creative-workflow/easy-html-generator
|
346
348
|
* https://travis-ci.org/creative-workflow/easy-html-generator
|
347
349
|
* https://codeclimate.com/github/creative-workflow/easy-html-generator
|
348
350
|
* https://rubygems.org/gems/easy_html_generator
|
351
|
+
* http://www.rubydoc.info/gems/easy_html_generator
|
352
|
+
* https://github.com/dennisvandehoef/easy-html-creator
|
349
353
|
|
350
354
|
### Authors
|
351
355
|
|