Skip to content
This repository was archived by the owner on Feb 18, 2021. It is now read-only.

Commit 365e9a2

Browse files
committed
gulp flow files
1 parent 862f2e3 commit 365e9a2

File tree

156 files changed

+2057
-2288
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

156 files changed

+2057
-2288
lines changed

docs/en/README.md

Lines changed: 45 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,9 @@ This boilerplate (seed project, starting project) helps you build large scale [A
1111
* [Prerequisites](#prerequisites)
1212
* [Use Guide](#use-guide)
1313
* [Tools for Development Workflow](#tools-for-development-workflow)
14-
* [Build](#build)
1514
* [Code Generation](#code-generation)
1615
* [Development](#development)
17-
* [Distribuction Preview](#distribuction-preview)
16+
* [Distribuction](#distribuction)
1817
* [Tests](#tests)
1918
* [Tools Configuration](#tools-configuration)
2019
* [Tips](#tips)
@@ -27,13 +26,15 @@ This boilerplate (seed project, starting project) helps you build large scale [A
2726

2827
<!-- toc stop -->
2928

30-
3129
## Overview
3230

3331
FrontEnd Boilerplate project with development and publishing tools (for GitHub gh-pages)
3432

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)
3636

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)
3738

3839
## Installation Guide
3940

@@ -42,100 +43,67 @@ Enter the following commands in the terminal
4243
```bash
4344
$ git clone https://github.com/erkobridee/angularjs-ee-boilerplate.git
4445
$ cd angularjs-ee-boilerplate
45-
$ cd tools
46-
$ npm run setup
46+
$ npm install
4747
$ cd ..
4848
$ cd publisher
4949
$ npm install
5050
```
5151

52+
> `./publisher` - installation is optional, used to deploy distribution version on `gh-pages` branch
5253
5354
### Prerequisites
5455

5556
* Must have [Git](http://git-scm.com/) installed
5657

5758
* Must have [node.js (at least v4.2.5)](http://nodejs.org/) installed with npm (Node Package Manager)
5859

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
6161

6262
## Use Guide
6363

64-
> `./` means root directoy
64+
> `./` means root directory
6565
6666
### Tools for Development Workflow
6767

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-
7268
> **Attention:** the following task **lintspaces** will verify the patterns insides files according rules inside `.editorconfig` in the root directory
7369
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-
8070
#### Code Generation
8171

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`
8373

8474
#### Development
8575

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
9977

100-
#### Distribuction Preview
78+
#### Distribuction
10179

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`
10381

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
10983

11084
#### Tests
11185

11286
##### Unit Tests
11387

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`
11589
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
11791

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
11993

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/`
12195

12296
##### e2e (end-to-end) - Selenium Tests
12397

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`
12599
126-
* `grunt protractor` - run only e2e test's
100+
* `gulp --e2e` - generate distribuction files and after it start webserver and execute e2e tests
127101

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`
129103

130104
#### Tools Configuration
131105

132-
* Tools global configs: `./tools/config.js` which is used on `./tools/helpers/grunt/config/project.js`
133-
134-
* Proxy routing configuration (see: `var backend = { ...`)
135-
136-
* Proxy Grunt.js Plugin : [grunt-connect-proxy](https://github.com/drewzboto/grunt-connect-proxy) | [Using grunt-connect-proxy](http://www.fettblog.eu/blog/2013/09/20/using-grunt-connect-proxy/)
137-
138-
* 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
139107

140108
#### Tips
141109

@@ -175,62 +143,48 @@ $ npm install
175143

176144
### Publishing tool for GitHub gh-pages
177145

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
189147
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
190149

191150
## Directories Structure
192151

193152
```
194153
./
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
198159
```
199160

200-
201161
### Development
202162

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+
203165
```
204166
/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
221176
```
222177

223178

224179
### Publishing
225180

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+
226183
```
227184
/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
234188
```
235189

236190

0 commit comments

Comments
 (0)