From 410979cff179d408e55052e9764a2026bd2be2a1 Mon Sep 17 00:00:00 2001 From: Spencer Alger Date: Wed, 15 Jan 2014 13:18:19 -0700 Subject: [PATCH] fixed browser_clients:* grunt tasks, and added build step to CONTRIBUTING.md --- CONTRIBUTING.md | 6 ++++-- grunt/browser_clients.js | 42 ++-------------------------------------- 2 files changed, 6 insertions(+), 42 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index be593ebf4..11c860d95 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 diff --git a/grunt/browser_clients.js b/grunt/browser_clients.js index 3be17841f..c77077c43 100644 --- a/grunt/browser_clients.js +++ b/grunt/browser_clients.js @@ -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' - // ]); - // }); - - }; \ No newline at end of file