From 3b2c4102e26bd93bd963bd7ce599e6753d31132d Mon Sep 17 00:00:00 2001 From: Igor Lino Date: Sat, 30 May 2015 00:30:07 +0200 Subject: [PATCH] Added build workflow for continuous integration. Added JSHint, JS CodeStyle configuration files Added a robust gitignore setting. Added readme, contributing and changelog. --- .editorconfig | 5 ++-- .gitignore | 69 ++++++++++++++++++++++++++++++++++++++++++++- .jscsrc | 73 ++++++++++++++++++++++++++++++++++++++++++++++++ .jshintrc | 60 +++++++++++++++++++++++++++++++++++++++ .npmignore | 2 ++ CHANGELOG.md.txt | 6 ++++ CONTRIBUTING.md | 13 +++++++++ README.md | 43 ++++++++++++++++++++++++++++ 8 files changed, 268 insertions(+), 3 deletions(-) create mode 100644 .jscsrc create mode 100644 .jshintrc create mode 100644 .npmignore create mode 100644 CHANGELOG.md.txt create mode 100644 CONTRIBUTING.md create mode 100644 README.md diff --git a/.editorconfig b/.editorconfig index e717f5e..7a0d26c 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,9 +1,10 @@ -# http://editorconfig.org +# top-most EditorConfig file root = true +# Unix-style newlines with a newline ending every file [*] indent_style = space -indent_size = 2 +indent_size = 4 end_of_line = lf charset = utf-8 trim_trailing_whitespace = true diff --git a/.gitignore b/.gitignore index 3018b3a..e50f43d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,68 @@ -.tmp/ +# Ignore Visual Studio Project # +################### +*.user +*.gpState +*.suo +bin +obj +/packages + +# Ignore Node & Bower +################### +node_modules +bower_components +build +.tmp + +# Ignore Test reporters +################### +**/test/coverage +report + +# Ignore Web Storm # +.idea + +# Compiled source # +################### +*.com +*.class +*.dll +*.exe +*.o +*.so + +# Packages # +############ +# it's better to unpack these files and commit the raw source +# git has its own built in compression methods +*.7z +*.dmg +*.gz +*.iso +*.jar +*.rar +*.tar +*.xap +*.zip + +# Logs and databases # +###################### +*.log +*.sql +*.sqlite +# *.sdf +*.mdf +*.ldf + +# OS generated files # +###################### +.DS_Store* +ehthumbs.db +Icon? +Thumbs.db + +# Custom # +###################### +.build +dist +*.mo diff --git a/.jscsrc b/.jscsrc new file mode 100644 index 0000000..57c6b7b --- /dev/null +++ b/.jscsrc @@ -0,0 +1,73 @@ +{ + "excludeFiles": ["node_modules/**", "bower_components/**"], + + "requireCurlyBraces": [ + "if", + "else", + "for", + "while", + "do", + "try", + "catch" + ], + "requireOperatorBeforeLineBreak": true, + "requireCamelCaseOrUpperCaseIdentifiers": true, + "maximumLineLength": { + "value": 150, + "allowComments": true, + "allowRegex": true + }, + "validateIndentation": 4, + "validateQuoteMarks": "'", + + "disallowMultipleLineStrings": true, + "disallowMixedSpacesAndTabs": true, + "disallowSpaceAfterPrefixUnaryOperators": true, + "disallowMultipleVarDecl": null, + "disallowTrailingWhitespace": true, + + + "requireSpaceAfterKeywords": [ + "if", + "else", + "for", + "while", + "do", + "switch", + "return", + "try", + "catch" + ], + "requireSpaceBeforeBinaryOperators": [ + "=", "+=", "-=", "*=", "/=", "%=", "<<=", ">>=", ">>>=", + "&=", "|=", "^=", "+=", + + "+", "-", "*", "/", "%", "<<", ">>", ">>>", "&", + "|", "^", "&&", "||", "===", "==", ">=", + "<=", "<", ">", "!=", "!==" + ], + "requireSpaceAfterBinaryOperators": true, + "requireSpacesInConditionalExpression": true, + "requireSpaceBeforeBlockStatements": true, + "requireLineFeedAtFileEnd": true, + "disallowSpacesInsideObjectBrackets": "all", + "disallowSpacesInsideArrayBrackets": "all", + "disallowSpacesInsideParentheses": true, + + "validateJSDoc": { + "checkParamNames": true, + "requireParamTypes": true + }, + + "disallowMultipleLineBreaks": true, + + "disallowCommaBeforeLineBreak": null, + "disallowDanglingUnderscores": null, + "disallowEmptyBlocks": null, + "disallowMultipleLineStrings": null, + "disallowTrailingComma": null, + "requireCommaBeforeLineBreak": null, + "requireDotNotation": null, + "requireMultipleVarDecl": null, + "requireParenthesesAroundIIFE": true +} diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 0000000..039e555 --- /dev/null +++ b/.jshintrc @@ -0,0 +1,60 @@ +{ + "bitwise": true, + "camelcase": true, + "curly": true, + "eqeqeq": true, + "es3": false, + "forin": true, + "freeze": true, + "immed": true, + "indent": 4, + "latedef": "nofunc", + "newcap": true, + "noarg": true, + "noempty": true, + "nonbsp": true, + "nonew": true, + "plusplus": false, + "quotmark": "single", + "undef": true, + "unused": false, + "strict": false, + "maxparams": 10, + "maxdepth": 5, + "maxstatements": 40, + "maxcomplexity": 8, + "maxlen": 150, + + "asi": false, + "boss": false, + "debug": false, + "eqnull": true, + "esnext": false, + "evil": false, + "expr": false, + "funcscope": false, + "globalstrict": false, + "iterator": false, + "lastsemic": false, + "laxbreak": false, + "laxcomma": false, + "loopfunc": true, + "maxerr": false, + "moz": false, + "multistr": false, + "notypeof": false, + "proto": false, + "scripturl": false, + "shadow": false, + "sub": true, + "supernew": false, + "validthis": false, + "noyield": false, + + "browser": true, + "node": true, + + "globals": { + "angular": false + } +} diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..9daa824 --- /dev/null +++ b/.npmignore @@ -0,0 +1,2 @@ +.DS_Store +node_modules diff --git a/CHANGELOG.md.txt b/CHANGELOG.md.txt new file mode 100644 index 0000000..828a8d8 --- /dev/null +++ b/CHANGELOG.md.txt @@ -0,0 +1,6 @@ + + +# 1.0.0 (2015-28-05) +- build v1.0.1 +- Initial commit, it includes bower repository settings. +- Refactor naming. \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..6733d76 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,13 @@ +# Contributing + +Before sending a pull request remember to follow [jQuery Core Style Guide](http://contribute.jquery.org/style-guide/js/). + +1. Fork it! +2. Use an editor that has EditorConfig support +3. Create your feature branch: `git checkout -b my-new-feature` +4. Make your changes on the `src` folder, never on the `dist` folder. +5. ENSURE to follow the EditorConfig format style (found in this project), in order to have a consistent format style. (Webstorm supports/detects EditorConfig can auto-format JavScript files by pressing Ctrl-Alt-L ) +6. ENSURE to follow [John's Angular Style Guide](https://github.com/johnpapa/angular-styleguide) +7. Commit your changes: `git commit -m 'Add some feature'` +8. Push to the branch: `git push origin my-new-feature` +9. Submit a pull request :D diff --git a/README.md b/README.md new file mode 100644 index 0000000..b0705ce --- /dev/null +++ b/README.md @@ -0,0 +1,43 @@ +[Angular Directive](http://igorlino.github.io/angular-elevatezoom-plus/) +================================ + +[Angular EZ Plus](http://igorlino.github.io/angular-elevatezoom-plus/) is directive for [ElevateZoom Plus](http://igorlino.github.io/elevatezoom-plus/) + +## Features + +- Image Zooming +- Easing +- Angular directive + +## Installation + +Via [npm](https://www.npmjs.com/): + +```bash +npm install angular-ez-plus +``` + +Via [Bower](http://bower.io/): + +```bash +bower install angular-ez-plus +``` + +In a browser: + +```html + +``` + +## Getting Started + +Include jQuery and the plug-in on a page. Include your images and initialise the plug-in. + +```html + +``` + +For more information on how to setup and customise, [check the examples](http://igorlino.github.io/angular-elevatezoom-plus/). + +## License +Licensed under MIT license.