You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 18, 2021. It is now read-only.
Copy file name to clipboardExpand all lines: docs/en/README.md
+45-91Lines changed: 45 additions & 91 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,10 +11,9 @@ This boilerplate (seed project, starting project) helps you build large scale [A
11
11
*[Prerequisites](#prerequisites)
12
12
*[Use Guide](#use-guide)
13
13
*[Tools for Development Workflow](#tools-for-development-workflow)
14
-
*[Build](#build)
15
14
*[Code Generation](#code-generation)
16
15
*[Development](#development)
17
-
*[Distribuction Preview](#distribuction-preview)
16
+
*[Distribuction](#distribuction)
18
17
*[Tests](#tests)
19
18
*[Tools Configuration](#tools-configuration)
20
19
*[Tips](#tips)
@@ -27,13 +26,15 @@ This boilerplate (seed project, starting project) helps you build large scale [A
27
26
28
27
<!-- toc stop -->
29
28
30
-
31
29
## Overview
32
30
33
31
FrontEnd Boilerplate project with development and publishing tools (for GitHub gh-pages)
34
32
35
-
***Important**: to define a better communication between frontend and backend (server), please consider follow the given proposal [REST URL Design](rest_url_design.md)
33
+
***Important:**
34
+
35
+
* to define a better communication between frontend and backend (server), please consider follow the given proposal [REST URL Design](rest_url_design.md)
36
36
37
+
*`./tools` and `./publisher` are based on [[GitHub] soudev / gulp-steps](https://github.com/soudev/gulp-steps) - [04](https://github.com/soudev/gulp-steps/tree/master/04)
37
38
38
39
## Installation Guide
39
40
@@ -42,100 +43,67 @@ Enter the following commands in the terminal
> `./publisher` - installation is optional, used to deploy distribution version on `gh-pages` branch
52
53
53
54
### Prerequisites
54
55
55
56
* Must have [Git](http://git-scm.com/) installed
56
57
57
58
* Must have [node.js (at least v4.2.5)](http://nodejs.org/) installed with npm (Node Package Manager)
58
59
59
-
* Must have [Grunt](https://github.com/gruntjs/grunt) node package installed globally
60
-
60
+
* Must have [Gulp](http://gulpjs.com/) node package installed globally
61
61
62
62
## Use Guide
63
63
64
-
> `./` means root directoy
64
+
> `./` means root directory
65
65
66
66
### Tools for Development Workflow
67
67
68
-
> Inside `./tools` directory, available grunt.js commands
69
-
70
-
*`grunt` >> (default task) that will execute lintspaces, jshint to verify and ensure js code quality and cleanup build and dist directories
71
-
72
68
> **Attention:** the following task **lintspaces** will verify the patterns insides files according rules inside `.editorconfig` in the root directory
73
69
74
-
#### Build
75
-
76
-
*`grunt build:dev` >> prepare files for development, inside `./tools/.temp` directory
77
-
78
-
*`grunt build:prod` >> cleanup build directories, execute test's and then prepare files for distribution / production, inside `./dist` directory
79
-
80
70
#### Code Generation
81
71
82
-
*`grunt generate`>> ask for which code generate option you want, values for the chosen and finally output destination
72
+
*`gulp generate`- ask for which code generate option you want, values for the chosen and finally output destination, templated available on `./tools/lib/generate/templates`
83
73
84
74
#### Development
85
75
86
-
*`grunt dev:livereload` >> first will execute `build:dev` task, after that start web server with livereload support and watch changes on files *.html, .css and .js*, that will update all browsers and devices connect to server
87
-
88
-
*`grunt dev:livereload:proxy` >> beyond the `dev:livereload` tasks, this task create a proxy to route requests to other server based on given context, for example `/rest`
89
-
90
-
*`grunt dev:sync` >> first will execute `build:dev` task, after that start web server with browser-sync support and watch changes on files *.html, .css and .js*, that will update all browsers and devices connect to server and sync data and navigation
91
-
92
-
*`grunt dev:sync:proxy` >> beyond the `dev:sync` tasks, this task create a proxy to route requests to other server based on given context, for example `/rest`
93
-
94
-
##### alias
95
-
96
-
*`grunt dev` >> alias to `grunt dev:livereload`
97
-
98
-
*`grunt dev:proxy` >> alias to `grunt dev:livereload:proxy`
76
+
*`gulp` - prepare and execute development workflow
99
77
100
-
#### Distribuction Preview
78
+
#### Distribuction
101
79
102
-
*`grunt dist` >> first will execute `build:prod` task, after that start web server with generated files
80
+
*`gulp --release` - generate distribuction version on `./dist`
103
81
104
-
*`grunt dist:proxy` >> first will execute `build:prod` task, after that start web server with generated files + proxy to route requests to other server based on given context, for example `/rest`
105
-
106
-
*`grunt dist:sync` >> first will execute `build:prod` task, after that start web server with generated files + browser-sync to synchronize data and navigation
107
-
108
-
*`grunt dist:sync:proxy` >> first will execute `build:prod` task, after that start web server with generated files + browser-sync to synchronize data and navigation + proxy to route requests to other server based on given context, for example `/rest`
82
+
*`gulp --preview` - generate distribuction version on `./dist` and start webserver to check application
109
83
110
84
#### Tests
111
85
112
86
##### Unit Tests
113
87
114
-
*`grunt ci` - cleanup build directories and then execute `karma:ci` grunt task that run test's
88
+
> karma configs defined on `./tools/karma.options.js`, gulp tasks configs defined on `./tools/karma.config.js` and loaded on `./tools/config.js`
115
89
116
-
*`grunt reports` - cleanup build directories, execute `karma:reports` grunt task that generate coverage and jasmine html reports and then open reports output directory
90
+
*`gulp --karma` - run development and karma tests flow
117
91
118
-
*`grunt specs` - first generate coverage and jasmine html reports, start karma with watch process and webserver with livereload watching reports html's
92
+
*`gulp karma:specs` - start karma process and watch for project or test js file change
119
93
120
-
> **Attention:** if you want to run with dev flow, run first dev task (ex.: `grunt dev`) in one terminal and in other terminal run `grunt specs`
94
+
*`gulp karma:coverage` - run karma tests and generate coverage report on `./tests_out/coverage/html/`
121
95
122
96
##### e2e (end-to-end) - Selenium Tests
123
97
124
-
*`grunt e2e` - execute `build:prod`, start web server with proxy support and then run e2e test's with Protractor
98
+
> protractor global configs defined on `./tools/protractor.config.js` and loaded and specified on `./tools/config.js`
125
99
126
-
*`grunt protractor` - run only e2e test's
100
+
*`gulp --e2e` - generate distribuction files and after it start webserver and execute e2e tests
127
101
128
-
> **Attention:** need to run with dev flow, run first (ex.: `grunt dev`) in one terminal and in other terminal run `grunt protractor` or specific test's suite `grunt protractor --suite bookmarks` (Protractor configs: `./tools/config.protractor.js`)
102
+
*`gulp --protractor={suiteName}` - prepare webserver and run one suite test defined on `./tools/config.js`
129
103
130
104
#### Tools Configuration
131
105
132
-
* Tools global configs: `./tools/config.js` which is used on `./tools/helpers/grunt/config/project.js`
* To center and make more easy to manage Grunt.js tasks configurations was defined the file `./tools/helpers/grunt/config/project.js`
106
+
* Tools global configs: `./tools/config.js` which is loaded on `./tools/gulp/helpers/$.js` this one is injected on each `./tools/gulp/tasks` file
139
107
140
108
#### Tips
141
109
@@ -175,62 +143,48 @@ $ npm install
175
143
176
144
### Publishing tool for GitHub gh-pages
177
145
178
-
> Inside `./publisher` directory, available grunt.js commands
179
-
180
-
*`grunt init` >> do project clone from GitHub inside `./publisher/local/gh-pages` directory and checkout `gh-pages` branch, which is used to update remote `gh-pages` branch on GitHub
181
-
182
-
> Execute this command at once, before the following commands
183
-
184
-
--
185
-
186
-
*`grunt publish` >> this task will invoke `grunt build:prod` command inside `./tools` directory, then copy generated files from `./dist` to `./publisher/local/gh-pages`, commit files and finally push to `gh-pages` branch on GitHub
187
-
188
-
*`grunt publish:dev` - this task will copy files from `./src` to `./publisher/local/gh-pages`, commit files and finally push to `gh-pages` branch on GitHub
146
+
> Inside `./publisher` directory
189
147
148
+
*`gulp --publish` - this task will invoke `gulp --release` command at root, then copy generated files from `./dist` to `./publisher/.local`, commit files and finally push to `gh-pages` branch on GitHub
190
149
191
150
## Directories Structure
192
151
193
152
```
194
153
./
195
-
/src >> project source
196
-
/tools >> development tools
197
-
/publisher >> publisher tool
154
+
/src >> project source
155
+
/tools >> development tools
156
+
/publisher >> publisher tool
157
+
gulpfile.js >> main gulp.js file
158
+
package.json >> node.js project and dependencies configuration
198
159
```
199
160
200
-
201
161
### Development
202
162
163
+
> `./tools/gulp` based on [[GitHub] soudev / gulp-steps](https://github.com/soudev/gulp-steps) - [04](https://github.com/soudev/gulp-steps/tree/master/04)
164
+
203
165
```
204
166
/tools
205
-
/helpers
206
-
/lib >> auxiliary processing
207
-
/scripts >> automation processing
208
-
/html_report_template
209
-
jasmine.html >> jasmine html report template
210
-
/grunt
211
-
/config >> configuration files to grunt.js tasks
212
-
/tasks >> custom grunt.js tasks
213
-
/tests
214
-
require.config.js >> load application files and test's specs for Karma Runner
215
-
/templates >> templates files for grunt.js generate task
216
-
config.js >> global configs for grunt.js tasks
217
-
config.karma.js >> referenced on config.js
218
-
config.protractor.js >> config for Protractor
219
-
Gruntfile.js >> main grunt.js configuration file
220
-
package.json >> node.js 'tools' project and dependencies configuration
167
+
/gulp
168
+
/lib >> auxiliary processing
169
+
/scripts >> useful scripts used on npm scripts
170
+
/tests
171
+
require.config.js >> load application files and test's specs for Karma Runner
172
+
config.js >> global configs to gulp tasks
173
+
karma.config.js >> karma tasks configs loaded on `config.js`
174
+
karma.options.js >> karma configs used on `karma.config.js`
175
+
protractor.config.js >> protractor config file used with protractor process
221
176
```
222
177
223
178
224
179
### Publishing
225
180
181
+
> `./publisher/gulp` based on [[GitHub] soudev / gulp-steps](https://github.com/soudev/gulp-steps) - [04](https://github.com/soudev/gulp-steps/tree/master/04)
182
+
226
183
```
227
184
/publisher
228
-
/helpers
229
-
/grunt
230
-
/config >> configuration files to grunt.js tasks
231
-
/tasks >> custom grunt.js tasks
232
-
Gruntfile.js >> main grunt.js configuration file
233
-
package.json >> node.js 'publisher' project and dependencies configuration
185
+
/gulp
186
+
gulpfile.js >> main gulp.js file
187
+
package.json >> node.js `publisher` project and dependencies configuration
0 commit comments