fixed browser_clients:* grunt tasks, and added build step to CONTRIBUTING.md

This commit is contained in:
Spencer Alger
2014-01-15 13:18:19 -07:00
parent a80e6aba4f
commit 410979cff1
2 changed files with 6 additions and 42 deletions

View File

@ -36,12 +36,14 @@ The process for contributing to any of the Elasticsearch repositories is similar
```sh
grunt test_unit
```
4. Optionally, run the browser tests. While this step is automated and simple, it can take several minutes for the test to complete. Unless you are making changes to browser specific portions of the code you can probably let Travis run the browser tests for you.
4. Optionally, run the browser tests. While this step is automated and simple, it can take several minutes for the tests to complete. Unless you are making changes to browser specific portions of the code you can probably let Travis run the browser tests for you.
Quick Option: Run them locally in your browser
```sh
node ./test/utils/server
# open http://localhost:8000/browser.html, angular.html, or jquery.html
grunt browser_clients:build
# open http://127.0.0.1:8000/unit.html
# open http://127.0.0.1:8000/builds.html
```
Run them on Sauce Labs across several browsers, operating systems, and browser versions

View File

@ -1,9 +1,8 @@
module.exports = function (grunt) {
grunt.registerTask('browser_clients:test', [
'browser_clients:build',
'run:browser_unit_tests'
// 'browserify:yaml_tests',
// 'run:browser_integration_tests'
'run:browser_test_server',
'saucelabs-mocha'
]);
grunt.registerTask('browser_clients:build', [
@ -16,7 +15,6 @@ module.exports = function (grunt) {
]);
grunt.registerTask('browser_clients:distribute', [
'clean:dist',
'browser_clients:build',
'copy:dist_to_named_dir',
'compress:master_zip',
@ -27,7 +25,6 @@ module.exports = function (grunt) {
grunt.registerTask('browser_clients:release', [
'prompt:confirm_release',
'__check_for_confirmation',
'clean:dist',
'browser_clients:build',
'copy:dist_to_named_dir',
'compress:release_zip',
@ -35,11 +32,6 @@ module.exports = function (grunt) {
's3:upload_archives'
]);
grunt.registerTask('browser_clients:test', [
'run:browser_test_server',
'saucelabs-mocha'
]);
grunt.registerTask('__check_for_confirmation', function () {
if (grunt.config.get('confirm.release')) {
grunt.log.verbose.writeln('release confirmed');
@ -48,34 +40,4 @@ module.exports = function (grunt) {
}
});
// grunt.registerTask('browser_clients:export_all', function () {
// grunt.task.run([
// 'build',
// 'export_client:angular:../bower-elasticsearch-angular',
// 'export_client::../bower-elasticsearch-browser',
// 'export_client:jquery:../bower-elasticsearch-jquery'
// ]);
// });
// grunt.registerTask('browser_clients:export_client', function (build, outDir) {
// var path = require('path');
// grunt.config.set('copy.export_client', {
// expand: true,
// cwd: './dist/',
// src: 'elasticsearch' + (build ? '.' + build : '') + '{.min,}.js',
// dest: outDir,
// rename: function (dest, src) {
// return path.join(dest, 'elasticsearch' + (~src.indexOf('.min') ? '.min' : '') + '.js');
// }
// });
// this.requires('build');
// grunt.task.run([
// 'copy:export_client'
// ]);
// });
};