Skip to content

Commit

Permalink
update to v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
georapbox committed Aug 9, 2016
1 parent c3e3622 commit 932e55d
Show file tree
Hide file tree
Showing 11 changed files with 437 additions and 312 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/node_modules
/dist
/demo
.idea
.idea
npm-debug.log
150 changes: 91 additions & 59 deletions .jscsrc
Original file line number Diff line number Diff line change
@@ -1,60 +1,92 @@
{
"requireSpaceBeforeBlockStatements": true,
"requireParenthesesAroundIIFE": true,
"requireMultipleVarDecl": true,
"requireBlocksOnNewline": true,
"disallowPaddingNewlinesInBlocks": true,
"disallowEmptyBlocks": true,
"disallowSpacesInsideParentheses": true,
"disallowSpaceAfterObjectKeys": true,
"requireSpaceBeforeObjectValues": true,
"requireCommaBeforeLineBreak": true,
"requireSpaceBeforeBinaryOperators": true,
"requireSpaceAfterBinaryOperators": true,
"requireCamelCaseOrUpperCaseIdentifiers": true,
"disallowTrailingComma": true,
"requireCapitalizedConstructors": true,
"requireDotNotation": true,
"disallowYodaConditions": true,
"disallowNewlineBeforeBlockStatements": true,
"validateParameterSeparator": ", ",
"requireSpacesInConditionalExpression": {
"afterTest": true,
"beforeConsequent": true,
"afterConsequent": true,
"beforeAlternate": true
},
"requireSpacesInFunctionExpression": {
"beforeOpeningRoundBrace": true,
"beforeOpeningCurlyBrace": true
},
"requireSpacesInAnonymousFunctionExpression": {
"beforeOpeningRoundBrace": true,
"beforeOpeningCurlyBrace": true
},
"disallowSpacesInFunctionDeclaration": {
"beforeOpeningRoundBrace": true
},
"requireSpaceAfterKeywords": [
"do",
"for",
"if",
"else",
"switch",
"case",
"try",
"catch",
"void",
"while",
"with",
"return",
"typeof",
"function"
],
"disallowKeywords": [
"with"
],
"disallowKeywordsOnNewLine": [
"else"
]
}
"requireCurlyBraces": [
"if",
"else",
"for",
"while",
"do",
"try",
"catch"
],
"validateIndentation": 2,
"maximumLineLength": {
"value": 100,
"allExcept": [
"comments",
"urlComments",
"regex",
"functionSignature",
"require"
]
},
"requireSpacesInForStatement": true,
"requireParenthesesAroundIIFE": true,
"requireLineFeedAtFileEnd": true,
"requireBlocksOnNewline": 1,
"disallowPaddingNewlinesInBlocks": true,
"disallowEmptyBlocks": true,
"requireCommaBeforeLineBreak": true,
"disallowTrailingComma": true,
"requireSpaceAfterLineComment": true,
"disallowMultipleSpaces": {
"allowEOLComments": true
},
"disallowSpaceAfterObjectKeys": true,
"requireSpaceBeforeObjectValues": true,
"requireTrailingComma": false,
"requireSpaceAfterComma": true,
"requireSpaceBeforeComma": false,
"disallowSpaceAfterComma": false,
"disallowSpaceBeforeComma": true,
"requireSpaceBeforeBinaryOperators": true,
"requireSpaceAfterBinaryOperators": true,
"disallowMixedSpacesAndTabs": true,
"disallowSpacesInsideObjectBrackets": "all",
"disallowSpacesInsideArrayBrackets": "all",
"requireSpacesInConditionalExpression": true,
"requireSpacesInAnonymousFunctionExpression": {
"beforeOpeningRoundBrace": true,
"beforeOpeningCurlyBrace": true,
"allExcept": ["shorthand"]
},
"requireSpacesInFunctionDeclaration": {
"beforeOpeningCurlyBrace": true
},
"disallowSpacesInFunctionDeclaration": {
"beforeOpeningRoundBrace": true,
},
"requireSpaceAfterKeywords": [
"if",
"else",
"for",
"while",
"do",
"switch",
"case",
"return",
"try",
"catch",
"typeof",
"void"
],
"disallowSpaceBeforePostfixUnaryOperators": true,
"disallowTrailingWhitespace": true,
"disallowKeywords": ["with"],
"requireDotNotation": true,
"disallowYodaConditions": true,
"disallowNewlineBeforeBlockStatements": true,
"requireParenthesesAroundIIFE": true,
"disallowKeywordsOnNewLine": [
"else",
"catch"
],
"disallowMultipleLineBreaks": true,
"disallowMultipleVarDecl": false,
"requirePaddingNewLinesAfterBlocks": false,
"disallowQuotedKeysInObjects": false,
"validateQuoteMarks": {
"mark": "'",
"escape": true,
"ignoreJSX": true
}
}
99 changes: 75 additions & 24 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -1,25 +1,76 @@
{
"camelcase": true,
"curly": true,
"eqeqeq": true,
"forin": true,
"freeze": true,
"immed": true,
"latedef": "nofunc",
"newcap": true,
"noarg": true,
"noempty": true,
"nonbsp": true,
"nonew": true,
"quotmark": "single",
"undef": true,
"unused": "strict",
"browser": true,
"devel": true,
"plusplus": true,
"indent": 4,
"predef": [
"angular",
"module"
]
}
"bitwise": false,
"curly": true,
"eqeqeq": true,
"esversion": 6,
"forin": true,
"freeze": true,
"funcscope": false,
"futurehostile": true,
"globals": {
"angular": false
},
"iterator": false,
"latedef": true,
"maxcomplexity": false,
"maxdepth": 0,
"maxerr": 100,
"maxparams": 6,
"maxstatements": 0,
"noarg": true,
"nocomma": true,
"nonbsp": true,
"nonew": true,
"notypeof": false,
"predef": [
"define",
"describe",
"expect",
"it",
"spyOn"
],
"shadow": false,
"singleGroups": true,
"strict": true,
"undef": true,
"unused": true,
"varstmt": false,
"asi": false,
"boss": false,
"debug": false,
"elision": false,
"eqnull": true,
"evil": false,
"expr": true,
"lastsemic": false,
"loopfunc": false,
"moz": false,
"noyield": false,
"plusplus": true,
"proto": false,
"scripturl": false,
"supernew": false,
"validthis": false,
"withstmt": false,
"browser": true,
"browserify": false,
"couch": false,
"devel": true,
"dojo": false,
"jasmine": false,
"jquery": false,
"mocha": false,
"module": false,
"mootools": false,
"node": false,
"nonstandard": false,
"phantom": false,
"prototypejs": false,
"qunit": false,
"rhino": false,
"shelljs": false,
"typed": false,
"worker": false,
"wsh": false,
"yui": false
}
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# CHANGELOG

## v1.0.0

### Breaking changes

- Reverse the arguments the `callback` function accepts, in order to allow the usage of `data` argument without the need to also specify the `topic` if not needed.
- Throw exception if `callback` is not a `function` or is not provided at all.

### Other updates
- Fix JSDoc annotations.
- Update dev dependancies.
- Provide `npm` scripts to run the tasks. No more need for global dependancies installed (Grunt).

## v0.0.1

Initial release
10 changes: 5 additions & 5 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),

uglify: {
options: {
banner: '/**\n * <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> - v<%= pkg.version %>\n * <%= pkg.description %>\n * <%= pkg.homepage %>\n * <%= pkg.license %>\n */\n'
banner: '/**\n * <%= pkg.name %>\n * <%= pkg.description %>\n * \n * @version <%= pkg.version %>\n * @homepage <%= pkg.homepage %>\n * @repository <%= pkg.repository.url %>\n * @license <%= pkg.license %>\n */\n'
},
build: {
src: 'src/angular-pubsub.js',
dest: 'dist/angular-pubsub.min.js'
}
},

removelogging: {
dev: {
src: 'src/angular-pubsub.js',
Expand All @@ -37,10 +37,10 @@ module.exports = function (grunt) {
'Minify to dist folder and remove logs.',
['uglify', 'removelogging:dist']
);

grunt.registerTask(
'removeloggingDev',
'Removes logs from src files.',
['removelogging:dev']
);
};
};
3 changes: 1 addition & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2014 George Raptis
Copyright (c) 2016 George Raptis

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Loading

0 comments on commit 932e55d

Please sign in to comment.