diff --git a/.editorconfig b/.editorconfig index 856536052..0eef3827d 100644 --- a/.editorconfig +++ b/.editorconfig @@ -15,4 +15,4 @@ indent_style = space indent_size = 2 [*.md] -trim_trailing_whitespace = false \ No newline at end of file +trim_trailing_whitespace = false diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 000000000..30012f808 --- /dev/null +++ b/.jshintrc @@ -0,0 +1,59 @@ +{ + "bitwise": true, + "camelcase": true, + "curly": true, + "eqeqeq": true, + "esversion": 6, + "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": 120, + "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": 50, + "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/CONTRIBUTING.md b/CONTRIBUTING.md index 13998a9c7..02386e636 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,36 +4,36 @@ We are excited to have you working on the project and cordially request that you - [You think you've found a bug?](#bug) - [Code Style Guidelines](#rules) - [Commit Message Guidelines](#commit) - + ## Got a question or problem? - + Firstly, please go over our FAQ: https://github.com/angular-ui/ui-select/wiki/FAQs - + Please, do not open issues for the general support questions as we want to keep GitHub issues for bug reports and feature requests. You've got much better chances of getting your question answered on [StackOverflow](http://stackoverflow.com/questions/tagged/angular-ui-select) where maintainers are looking at questions tagged with `angular-ui-select`. - + StackOverflow is a much better place to ask questions since: * there are hundreds of people willing to help on StackOverflow * questions and answers stay available for public viewing so your question / answer might help someone else * SO voting system assures that the best answers are prominently visible. - + To save your and our time we will be systematically closing all the issues that are requests for general support and redirecting people to StackOverflow. - + ## You think you've found a bug? - + Oh, we are ashamed and want to fix it asap! But before fixing a bug we need to reproduce and confirm it. In order to reproduce bugs we will systematically ask you to provide a _minimal_ reproduce scenario using http://plnkr.co/. Having a live reproduce scenario gives us wealth of important information without going back & forth to you with additional questions like: * version of AngularJS used * version of this library that you are using * 3rd-party libraries used, if any * and most importantly - a use-case that fails - + A minimal reproduce scenario using http://plnkr.co/ allows us to quickly confirm a bug (or point out coding problem) as well as confirm that we are fixing the right problem. - + We will be insisting on a minimal reproduce scenario in order to save maintainers time and ultimately be able to fix more bugs. Interestingly, from our experience users often find coding problems themselves while preparing a minimal plunk. We understand that sometimes it might be hard to extract essentials bits of code from a larger code-base but we really need to isolate the problem before we can fix it. - + The best part is that you don't need to create plunks from scratch - you can use one from our [demo page](http://plnkr.co/edit/a3KlK8dKH3wwiiksDSn2?p=preview). - + Unfortunately we are not able to investigate / fix bugs without a minimal reproduce scenario using http://plnkr.co/, so if we don't hear back from you we are going to close an issue that don't have enough info to be reproduced. - + ## Coding Rules To ensure consistency throughout the source code, keep these rules in mind as you are working: diff --git a/README.md b/README.md index 71e423934..5055c1568 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ AngularJS-native version of [Select2](http://ivaynberg.github.io/select2/) and [Selectize](http://brianreavis.github.io/selectize.js/). [http://angular-ui.github.io/ui-select/](http://angular-ui.github.io/ui-select/) -[Getting Started](https://github.com/angular-ui/ui-select/wiki/Getting-Started) +[Getting Started](https://github.com/angular-ui/ui-select/wiki/Getting-Started) - [Examples](http://angular-ui.github.io/ui-select/#examples) - [Examples Source](./docs/examples) diff --git a/composer.json b/composer.json index aeee32a4d..96753fae2 100644 --- a/composer.json +++ b/composer.json @@ -26,4 +26,4 @@ ] } } -} \ No newline at end of file +} diff --git a/deploy-docs.sh b/deploy-docs.sh index f18e63a73..d9d85561a 100644 --- a/deploy-docs.sh +++ b/deploy-docs.sh @@ -1,5 +1,5 @@ #!/bin/bash -set -e +set -e [[ $TRAVIS_SECURE_ENV_VARS == "true" ]] || { echo "No github key avaliable, aborting publishing"; exit 0; } @@ -27,5 +27,5 @@ git config user.email "travisci@users.noreply.github.com" git commit -m "docs(*): new deploy (angular-ui/ui-select@${ID_REF})" -git push origin --quiet -#> /dev/null 2>&1 \ No newline at end of file +git push origin --quiet +#> /dev/null 2>&1 diff --git a/gulpfile.js b/gulpfile.js index ec77944e3..aaf05e6a3 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -31,6 +31,11 @@ gulp.task('clean', function(cb) { del(['dist'], cb); }); +var handleError = function (err) { + console.log(err.toString()); + this.emit('end'); +}; + gulp.task('scripts', ['clean'], function() { var buildTemplates = function () { @@ -160,7 +165,7 @@ gulp.task('docs', function (cb) { }); gulp.task('docs:clean', function (cb) { - del(['docs-built'], cb) + del(['docs-built'], cb); }); gulp.task('docs:assets', function () { @@ -181,15 +186,11 @@ gulp.task('docs:index', function () { var exampleFiles = $.filenames.get('exampleFiles'); exampleFiles = exampleFiles.map(function (filename) { var cleaned = titleCase(filename.replace('demo-', '').replace('.html', '')); - return '