Skip to content
This repository was archived by the owner on Jun 14, 2019. It is now read-only.

Commit 3964b52

Browse files
committed
Merge branch 'canary'
2 parents c4ebebf + e576ab6 commit 3964b52

File tree

24 files changed

+444
-109
lines changed

24 files changed

+444
-109
lines changed

.babelrc

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
{
22
"presets": [
33
[
4-
"es2015",
4+
"env",
55
{
6-
"modules": false
6+
"debug": true,
7+
"modules": false,
8+
"targets": {
9+
"browsers": [
10+
"> 1%",
11+
"last 3 versions",
12+
"Firefox ESR"
13+
]
14+
}
715
}
816
]
917
]
File renamed without changes.
File renamed without changes.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.idea
2+
13
.DS_Store
24
node_modules
35
npm-debug.log

.jshintrc

Lines changed: 0 additions & 21 deletions
This file was deleted.

.npmignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ bower_components
55
temp
66
dist/docs
77

8+
.github
9+
.idea
10+
.vertx
11+
812
# Test Stuff
913
/test/
1014
/test_scopes/

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.9
1+
6.10

.travis.yml

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
sudo: false
22
language: node_js
33
node_js:
4-
- "6.9"
4+
- "6.10"
55

66
addons:
77
code_climate:
@@ -15,9 +15,32 @@ after_script:
1515
- if [ "$TEST_SCOPE" == "" ]; then npm install -g codeclimate-test-reporter && codeclimate-test-reporter < build/coverage/report/lcov.info; fi
1616

1717
env:
18-
- TEST_SCOPE=
19-
- TEST_SCOPE=angular_1.2.x
20-
- TEST_SCOPE=angular_1.3.x
21-
- TEST_SCOPE=angular_1.4.x
22-
- TEST_SCOPE=angular_1.5.x
23-
- TEST_SCOPE=angular_1.6.x
18+
matrix:
19+
- TEST_SCOPE=
20+
- TEST_SCOPE= SAUCE_ENABLED=$_SAUCE_ENABLED SAUCE_USERNAME=$_SAUCE_USERNAME SAUCE_ACCESS_KEY=$_SAUCE_ACCESS_KEY
21+
- TEST_SCOPE=angular_1.2.x
22+
- TEST_SCOPE=angular_1.3.x
23+
- TEST_SCOPE=angular_1.4.x
24+
- TEST_SCOPE=angular_1.5.x
25+
- TEST_SCOPE=angular_1.6.x
26+
- TEST_SCOPE=sockjs-client_1.0.x
27+
- TEST_SCOPE=sockjs-client_1.1.x
28+
- TEST_SCOPE=vertx-bus_3.2.x
29+
- TEST_SCOPE=vertx-bus_3.3.x
30+
- TEST_SCOPE=vertx-bus_3.4.x
31+
global:
32+
- CXX=g++-4.8
33+
- secure: "BQeu14UTGr7gWrEz9O2NSDb4g4F40dWw2QKgglkLX58VmJYZn6anQLIavotmNr9XEG7car8lWkxuDrcQEbUvp/nunhSd2EvDn3fZwI5lLAfuWwvGgAd37SRbD4xKykrzqmSNfH6jHAB+Zm5UcYPr127OzrEUY08ArEDj9lyhnkY="
34+
- secure: "clpyd43PGosqt4eig31MMoDHOBoHRKHM+sx25GP8bWIw7ixp46z9yb00cOibHEwvbTW/reBiEmb3giDk0AHyduxDPJaK5uTKe/XjQNH+0fxilCvq9sY1bjhH95h7VV8TacASwTrhswgEMnALvTWxonNzsMgU5iTvrsGqXOVX4Z4="
35+
- secure: "KnYZgICysNrYQFBavQ3IQU6oUGCHabawI6aDlAtSUvi6O5g6GOvbTcU7XFlFU8OVNaujgRPDSSuSsHcv4Dmz8hKKIQ94G54qL1ZaxmLOP/PluItnGRQI8+jAsL8qoBCXfw/0ce0DBKi2QEwSxkNsv3uxlAg57d/L3YDrGUiYSp8="
36+
37+
matrix:
38+
allow_failures:
39+
- env: TEST_SCOPE= SAUCE_ENABLED=$_SAUCE_ENABLED SAUCE_USERNAME=$_SAUCE_USERNAME SAUCE_ACCESS_KEY=$_SAUCE_ACCESS_KEY
40+
41+
addons:
42+
apt:
43+
sources:
44+
- ubuntu-toolchain-r-test
45+
packages:
46+
- g++-4.8

CONTRIBUTING.md

Lines changed: 47 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,20 @@
11
# Contributing Guide
2-
32
Contributing to this repo is fairly easy. This document shows you how to
43
get the project, run all provided tests and generate a production ready build.
54

65
It also covers provided grunt tasks, that help you developing on this repo.
76

87
## Dependencies
9-
10-
To make sure, that the following instructions work, please install the following dependencies
8+
To make sure the following instructions work, please install the following dependencies
119
on you machine:
1210

1311
- Node.js
1412
- npm
1513
- Git
1614

1715
If you install node through the binary installation file, **npm** will be already there.
18-
When **npm** is installed, use it to install the needed npm packages:
19-
20-
- grunt-cli <code>npm install -g grunt-cli</code>
2116

2217
## Installation
23-
2418
To get the source of this project clone the git repository via:
2519

2620
````
@@ -36,42 +30,67 @@ $ npm install
3630

3731
(This will invoke a `bower install` automatically.)
3832

39-
The project is now installed and ready to be built.
33+
This commands installs everything which is required for building and testing the project.
4034

41-
## Building
42-
43-
This repo comes with a few **grunt tasks** which help you to automate
44-
the development process. The following grunt tasks are provided:
35+
## Testing
36+
Internally `angular-vertxbus` depends on **Grunt** and **Webpack**, however there have been been masked all steps behind
37+
simple tasks processed by **npm**.
4538

46-
#### <code>grunt</code>
39+
### Source linting: `npm run lint`
40+
`npm run lint` performs a lint for all (also part of `test`).
4741

48-
Running <code>grunt</code> without any parameters, will actually execute the registered
49-
default task. This includes a default linter and CoffeeScript transpiling.
42+
### Unit testing: `npm run test`
43+
`npm run test` executes (as you might think) the unit tests, which are located
44+
in `test/unit`. The task uses **karma**, the spectacular test runner, to execute the tests with
45+
the **jasmine testing framework**.
5046

51-
#### <code>grunt test</code>
47+
#### Testing of different scopes: `npm run test-scopes`
48+
Because `angular-vertxbus` supports multiple different versions of AngularJS 1.x, you should run the tests the code against these also.
5249

53-
<code>grunt test</code> executes (as you might thought) the unit tests, which are located
54-
in <code>test/unit</code>. The task uses **karma** the spectacular test runner to executes
55-
the tests with the **jasmine testing framework**.
50+
`npm run test-scopes` performs a `npm run test` against each registered scope which can be found at `/test_scopes/*`.
5651

57-
#### <code>grunt build</code>
52+
#### Testing headless: `npm run test-headless`
53+
Just like `npm run test`, the command `npm run test-headless` performs the test against a headless PhantomJS. Maybe
54+
useful in case of automatic tests.
5855

59-
You only have to use this task, if you want to generate a production ready build of
60-
this project. This task will also **lint**, **test** and **minify** the
56+
## Building
57+
### Standard build
58+
You will probably being never required using the command `npm run build`, because it will create a production-ready
59+
build of `angular-vertxbus`. This task will also **lint**, **test** and **minify** the
6160
source. After running this task, you'll find the following files in a generated
62-
<code>dist</code> folder:
61+
`/dist`folder:
62+
63+
````
64+
dist/angular-vertxbus.js
65+
dist/angular-vertxbus.min.js
66+
dist/angular-vertxbus.withpolyfill.js
67+
dist/angular-vertxbus.withpolyfill.min.js
68+
````
69+
70+
### Compile only
71+
The command `npm run compile` creates production-ready files at `/dist`, also part of `npm run build`.
6372

6473
````
6574
dist/angular-vertxbus.js
6675
dist/angular-vertxbus.min.js
76+
dist/angular-vertxbus.withpolyfill.js
77+
dist/angular-vertxbus.withpolyfill.min.js
6778
````
6879

69-
#### <code>grunt watch</code>
80+
## Developing
81+
The *local test environment* starts and utilizes a full Vert.x node and a NodeJS based web server.
82+
83+
**Easy:** Just run `npm run -s start-server` and open `http://localhost:3000/` in your preferred browser.
84+
85+
If you have changed something, just invoke `npm run -s compile` in parallel and refresh the browser.
86+
87+
Alternatively:
7088

71-
This task will watch all relevant files. When it notice a change, it'll run the
72-
**lint** and **test** task. Use this task while developing on the source
73-
to make sure, everytime you make a change you get notified if your code is incosistent
74-
or doesn't pass the tests.
89+
1. `npm run install-it-vertx-server` downloads and installs a Vert.x locally. This will store a cached download artifact at `test/e2e//vertx/`.
90+
2. `npm run start-it-vertx-server` starts an Vert.x on port `8080`.
91+
3. `npm run start-it-web-server` starts a web server on port `3000`.
92+
4. Ensure at least `npm run -s compile` has been invoked so there is a `dist/angular-vertxbus.js`.
93+
5. Open http://localhost:3000/ in your browser.
7594

7695
## Contributing/Submitting changes
7796

README.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# angular-vertxbus
22

3-
![Bower version](https://img.shields.io/bower/v/angular-vertxbus.svg) [![npm version](https://img.shields.io/npm/v/angular-vertxbus.svg)](https://www.npmjs.com/package/angular-vertxbus) [![cdnjs](https://img.shields.io/cdnjs/v/angular-vertxbus.svg)](https://cdnjs.com/libraries/angular-vertxbus) [![Build Status](https://img.shields.io/travis/knalli/angular-vertxbus.svg)](https://travis-ci.org/knalli/angular-vertxbus) [![Built with Grunt](https://cdn.gruntjs.com/builtwith.svg)](http://gruntjs.com/)
3+
![Bower version](https://img.shields.io/bower/v/angular-vertxbus.svg) [![npm version](https://img.shields.io/npm/v/angular-vertxbus.svg)](https://www.npmjs.com/package/angular-vertxbus) [![cdnjs](https://img.shields.io/cdnjs/v/angular-vertxbus.svg)](https://cdnjs.com/libraries/angular-vertxbus) [![Build Status](https://img.shields.io/travis/knalli/angular-vertxbus.svg)](https://travis-ci.org/knalli/angular-vertxbus) [![Sauce Test Status](https://saucelabs.com/buildstatus/knalli-angular-vertxbus)](https://saucelabs.com/u/angular-vertxbus) [![Built with Grunt](https://cdn.gruntjs.com/builtwith.svg)](http://gruntjs.com/) [![Greenkeeper badge](https://badges.greenkeeper.io/knalli/angular-vertxbus.svg)](https://greenkeeper.io/)
44

55
Client side library using VertX Event Bus as an Angular Service module
66

@@ -11,6 +11,10 @@ Client side library using VertX Event Bus as an Angular Service module
1111
| Canary | unstable | [![Build Status](https://travis-ci.org/knalli/angular-vertxbus.svg?branch=canary)](https://travis-ci.org/knalli/angular-vertxbus) |
1212
| Master | stable | [![Build Status](https://travis-ci.org/knalli/angular-vertxbus.svg?branch=master)](https://travis-ci.org/knalli/angular-vertxbus) |
1313

14+
Automatic tests running against the latest version of the major browsers:
15+
16+
[![Sauce Test Status](https://saucelabs.com/browser-matrix/angular-vertxbus.svg)](https://saucelabs.com/)
17+
1418

1519
## How to get
1620

@@ -24,7 +28,7 @@ Alternatively you can use the cdnjs: [cdnjs.com/libraries/angular-vertxbus](http
2428

2529
### JavaScript (Polyfill)
2630

27-
The source code is written using newer JavaScript 2015 (partly) and is using the JavaScript transpiler [BabelJS](https://babeljs.io).
31+
The source code is written using newer JavaScript ([ECMAScript 2015+](https://babeljs.io/learn-es2015/))and is using the JavaScript transpiler [BabelJS](https://babeljs.io).
2832

2933
Depending on your target clients, you probably need to include a browser polyfill (for ES5 clients). BabelJS itself
3034
recommends the [requirement of its own polyfill](https://babeljs.io/docs/usage/polyfill/). Either you use the explained
@@ -175,16 +179,23 @@ Note: Check that dependencies are be installed (`npm install`).
175179

176180
The *unit tests* are available with `npm test` which is actually a shortcut for `grunt test`. It performs tests under the current primary target version of AngularJS. Use `npm run test-scopes` for testing other scoped versions as well.
177181

178-
### E2E tests (manually)
182+
### Local test environment
179183

180184
Note: Check that dependencies are be installed (`npm install`).
181185

182-
The *end-to-end tests* start and utilize a full Vert.x node and a NodeJS based web server.
186+
The *local test environment* starts and utilizes a full Vert.x node and a NodeJS based web server.
187+
188+
**Easy:** Just run `npm run -s start-server` and open `http://localhost:3000/` in your preferred browser.
189+
190+
If you have changed something, just invoke `npm run -s compile` in parallel and refresh the browser.
191+
192+
Alternatively:
183193

184-
1. `npm run install-it-vertx-server` downloads and installs a Vert.x locally.
185-
2. `npm run start-it-vertx-server` starts Vert.x on port `8080`.
194+
1. `npm run install-it-vertx-server` downloads and installs a Vert.x locally. This will store a cached download artifact at `test/e2e//vertx/`.
195+
2. `npm run start-it-vertx-server` starts an Vert.x on port `8080`.
186196
3. `npm run start-it-web-server` starts a web server on port `3000`.
187-
4. Open http://localhost:3000/ in your browser.
197+
4. Ensure at least `npm run -s compile` has been invoked so there is a `dist/angular-vertxbus.js`.
198+
5. Open http://localhost:3000/ in your browser.
188199

189200
## License
190201

0 commit comments

Comments
 (0)