JimLiu/angular-ui-tree — pull request #257 by boneskull (2014-10-14 21:32:53+00:00)
Title: packaging and test fixes & improvements

**Bower**

- When providing a library, it's not recommended to keep `bower_components` anywhere, including `demo` directories. Thus:
- Remove `demo/bower_components/` from version control
- Add a `demo/bower.json` which specifies the dependencies for the demo. This package is marked `private`.
- Specify deps `angular`, `angularfire` and `bootstrap-css`.
- Install Bower components via `grunt-bower-install-simple`
- Distilled root `bower.json` to use only the files required by the module itself and the development environment.
- `angular` only in production
- `angular-mocks` and `jasmine-jquery` in development
- Test-related dependencies will install into `test/bower_components`
- Updated `karma.conf.js` to reflect this
- Fixed grammar & proper name in `description` field
- `angular-mocks` should always be at the same version `angular` is at
- `angular` is not required in `devDependencies` if in `dependencies`.
- `es5-shim` should not be a dependency of this module. Not all applications require IE8 support.
- There was too much stuff coming down in the Bower install that people don't need; all they need is the dist files. So that's what they get now. `LICENSE`, `bower.json`, and `README.md` are always included.

**Demo**

- Updated `demo/groups.html` and `demo/index.html` to reflect new path to Bootstrap CSS.

**JSCS**

- The `.jscsrc` specifies all line endings should be `CRLF`. Updated the source code to reflect this requirement.

**JSHint**

- JSHint defaults were project-wide. Since different directories have different contexts, I created:
- `source/.jshintrc`: Defaults for the source code.
- `test/.jshintrc`: Defaults for the tests. Includes predefined variables such as `describe`, `it`, `expect`, etc.
- Modified root `.jshintrc` to use `devel` and `jQuery` modes, which give you `console`, `$`, and `jQuery`.
- Removed `globalstrict: true` since this doesn't seem to be used, and is potentially dangerous (if a 3p lib is *not* using strict mode, this could cause it to break, thus causing *your* code to break)
- Add `.jshintignore` so that minified files and 3p libs do not get inspected.

**Grunt**

- Support the above; add [grunt-bower-install-simple](https://www.npmjs.org/package/grunt-bower-install-simple).
- `webserver` task will install "demo" dependencies
- `test` and `test:continuous` tasks will install "test" dependencies

**Travis-CI**

- Simplified install by adding a `test` script to `package.json`; Travis now just runs `npm test`
- Bower install handled by Grunt

**npm**

- Added `grunt-cli` as a dependency. This is a matter of preference; this allows any user to run `npm test` regardless of if they have a global `grunt-cli` installed.
- Upgraded all/most dependencies. Removed some unnecessary dependencies; mostly those leftover by old Karma version.

**Tests**

- Corrected some trailing commas and formatting.
- Always use fresh Scope to test with.
- Corrected problem in `uiTreeNodes` directive. The isolate Scope was causing issues when applying the `TreeNodesController`, thus failing the test in `nestedSortableCtrl.spec.js`. I remoted the isolate Scope and instead pulled the attributes out of the `attrs` object.
- Added some `'use strict';`'s

**Misc**
- Added `.editorconfig` which helps many different text editors use the correct settings for your project.
- Rebuilt. Noticed that there is a version number mismatch in the dist files somewhere.
- Suggestion: Use [grunt-gh-pages](https://www.npmjs.org/package/grunt-gh-pages) to publish your demo.

Great work. I'd like to contribute to this project, but without working tests, I cannot ensure my PRs are safe. The main point of this PR was to get the tests working, but many disparate systems were causing trouble, so I had to change much more than I had originally anticipated.

*Tests pass against AngularJS 1.3.0.*