Skip to content

Commit 0176d1a

Browse files
authored
Housekeeping (mroderick#125)
* Test in node LTS versions * Remove jQuery integration * Remove jslint * Remove grunt * Convert tests to use Mocha * Add eslint and fix violations Convert all files to use single quotes and spaces, not tabs. Update editorconfig to ensure spaces for indentation * Add coverage task * Make travis run eslint before tests * Conserve travis resources: only run lint for one node version * Conserve travis resources: use shallow git clone * Report coverage to Coveralls * Add Coveralls badge to README.md
1 parent 903eb3c commit 0176d1a

28 files changed

+3949
-10722
lines changed

.editorconfig

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
; EditorConfig file: http://EditorConfig.org
22
; Install the "EditorConfig" plugin into your editor to use
33

4-
root = true
5-
64
[*]
75
charset = utf-8
86
end_of_line = lf
97
insert_final_newline = true
10-
indent_style = tab
8+
indent_style = space
9+
indent_size = 4
1110
trim_trailing_whitespace = true
11+
12+
# Matches the exact files either package.json or .travis.yml
13+
[{package.json, .travis.yml}]
14+
indent_style = space
15+
indent_size = 2
16+
17+
; Needed if doing `git add --patch` to edit patches
18+
[*.diff]
19+
trim_trailing_whitespace = false

.eslintrc.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
module.exports = {
2+
"env": {
3+
"browser": true,
4+
"commonjs": true,
5+
"node": true
6+
},
7+
"extends": "eslint:recommended",
8+
"rules": {
9+
"indent": [
10+
"error",
11+
4
12+
],
13+
"linebreak-style": [
14+
"error",
15+
"unix"
16+
],
17+
"quotes": [
18+
"error",
19+
"single"
20+
],
21+
"semi": [
22+
"error",
23+
"always"
24+
]
25+
}
26+
};

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@
55
.tmp*
66
jquery.pubsub.js
77
/node_modules/
8-
/out/
8+
/out/coverage/
9+
.nyc_output/
10+
coverage

.jslintrc

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

.travis.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,21 @@ cache:
66
- node_modules
77

88
node_js:
9-
- "0.12"
10-
- "4.2"
9+
- "4"
10+
- "6"
11+
- "8"
1112

1213
before_script:
1314
- npm -q install
15+
# these build targets only need to run once per build, so let's conserve a few resources
16+
# ESLint only supports Node >=4
17+
- if [ "x$TRAVIS_NODE_VERSION" = "x8" ]; then npm run lint; fi
1418

1519
script:
1620
- npm test
21+
22+
after_success:
23+
- if [ "x$TRAVIS_NODE_VERSION" = "x8" ]; then npm run coverage && cat ./coverage/lcov.info | coveralls lib; fi
24+
25+
git:
26+
depth: 10

CONTRIBUTING.md

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -30,30 +30,3 @@ And in case we didn't emphasize it enough: we love tests!
3030
## Syntax
3131

3232
Install [Editor Config](http://editorconfig.org) for your text editor, this will ensure that the correct formatting is applied for each file type.
33-
34-
## Development
35-
36-
There are grunt tasks for helping with linting and testing the codebase.
37-
38-
### Test setup
39-
40-
The tests are implemented using [BusterJS](http://busterjs.org) and the excellent [Sinon.JS](http://sinonjs.org/). All dependencies can be installed with `npm install` (assuming you already have nodejs installed).
41-
42-
### Linting
43-
44-
```bash
45-
$ grunt lint
46-
```
47-
48-
### Testing with PhantomJS
49-
50-
If you have PhantomJS installed on your system, you can run the Buster tests by running
51-
52-
```bash
53-
$ grunt test
54-
```
55-
56-
or by running
57-
```bash
58-
$ npm test
59-
```

Gruntfile.js

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

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
[![Travis build status](https://img.shields.io/travis/mroderick/PubSubJS.svg)](https://travis-ci.org/mroderick/PubSubJS) [![David](https://img.shields.io/david/mroderick/pubsubjs.svg)](https://david-dm.org/mroderick/PubSubJS) [![David](https://img.shields.io/david/dev/mroderick/pubsubjs.svg)](https://david-dm.org/mroderick/PubSubJS#info=devDependencies&view=table)
44
![npm version](https://img.shields.io/npm/v/pubsub-js.svg) ![npm license](https://img.shields.io/npm/l/pubsub-js.svg) ![npm downloads per month](https://img.shields.io/npm/dm/pubsub-js.svg)
5+
[![Coverage Status](https://coveralls.io/repos/github/mroderick/PubSubJS/badge.svg)](https://coveralls.io/github/mroderick/PubSubJS)
56

67
PubSubJS is a [topic-based](http://en.wikipedia.org/wiki/Publish–subscribe_pattern#Message_filtering) [publish/subscribe](http://en.wikipedia.org/wiki/Publish/subscribe) library written in JavaScript.
78

Rakefile

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

autolint.js

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

0 commit comments

Comments
 (0)