From 27f1312ef1e5c86df07aab69a56f59f2b11f2865 Mon Sep 17 00:00:00 2001 From: Nicolas Le Goff Date: Wed, 5 Feb 2014 19:12:45 +0100 Subject: [PATCH] Add autobahn as project dependency --- .travis.yml | 7 +++++-- Gruntfile.js | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++-- bower.json | 4 +++- 3 files changed, 65 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index e7cb7edb8f..f5c0583328 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,8 @@ language: php env: - - SETUP_MODE=update - - SETUP_MODE=install + - SETUP_MODE=update JS_COMPILER=$TRAVIS_BUILD_DIR/closure/compiler.jar + - SETUP_MODE=install JS_COMPILER=$TRAVIS_BUILD_DIR/closure/compiler.jar services: - mysql @@ -11,6 +11,9 @@ services: - elasticsearch before_script: + - sudo apt-get update -qq && sudo apt-get install -qq scons inkscape python-setuptools + - sudo easy_install -U taschenmesser scour boto + - wget http://dl.google.com/closure-compiler/compiler-latest.zip && unzip compiler-latest.zip -d closure - node --version - npm --version - travis_retry npm install diff --git a/Gruntfile.js b/Gruntfile.js index 565d29215a..cd1faa113f 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -31,12 +31,21 @@ module.exports = function(grunt) { "jquery.ui": ["npm", {"grunt": "build"}], "jquery-mobile": ["npm", {"grunt": "dist"}], "tinymce": ["npm", "jake"], - "bootstrap": ["npm", {"make": "bootstrap"}] + "bootstrap": ["npm", {"make": "bootstrap"}], + "autobahnjs": [{"make":"build"}] } } } }, copy: { + "autobahnjs": { + "expand": true, + "src": [ + "<%= path.bower %>/autobahnjs/build/autobahn.min.js" + ], + "dest": "<%= path.asset %>/autobahnjs/", + "flatten": true + }, "backbone": { "expand": true, "src": [ @@ -83,6 +92,12 @@ module.exports = function(grunt) { "dest": "<%= path.asset %>/chai/", "flatten": true }, + "deps-when": { + "expand": true, + "cwd": "<%= path.bower %>/autobahnjs", + "src": "../when/when.js", + "dest": "<%= path.bower %>/autobahnjs/when" + }, "font-awesome": { "expand": true, "cwd": "<%= path.bower %>/font-awesome", @@ -314,6 +329,46 @@ module.exports = function(grunt) { grunt.loadNpmTasks("grunt-bower-postinst"); grunt.loadNpmTasks('grunt-mocha-phantomjs'); - grunt.registerTask("install-assets", ["clean:assets", "bower", "bower_postinst", "copy"]); + // This task is here to copy bower module into an other bower module + // Because bower removes .git folder you can not use git submodule update + // So fetch them with bower and copy them to appropriate path + grunt.registerTask("copy-deps", [ + "copy:deps-when" + ]); + grunt.registerTask("copy-assets", [ + "copy:autobahnjs", + "copy:backbone", + "copy:blueimp", + "copy:bootstrap", + "copy:bootstrap-multiselect", + "copy:chai", + "copy:font-awesome", + "copy:geonames-server-jquery-plugin", + "copy:humane-js", + "copy:i18next", + "copy:jquery", + "copy:jquery-file-upload", + "copy:jquery-mobile", + "copy:jquery.cookie", + "copy:jquery-ui", + "copy:js-fixtures", + "copy:json2", + "copy:mocha", + "copy:modernizr", + "copy:normalize", + "copy:qunit", + "copy:requirejs", + "copy:swfobject", + "copy:tinymce", + "copy:underscore", + "copy:zxcvbn" + ]); + grunt.registerTask("install-assets", [ + "clean:assets", + "bower", + "copy-deps", + "bower_postinst", + "copy-assets" + ]); grunt.registerTask('test', ["qunit", "mocha_phantomjs"]); }; diff --git a/bower.json b/bower.json index 334cb01a53..f399a99fa3 100644 --- a/bower.json +++ b/bower.json @@ -23,7 +23,9 @@ "swfobject": "latest", "tinymce": "~4.0", "jquery-galleria": "1.2.9", - "jquery.cookie": "~1.4" + "jquery.cookie": "~1.4", + "autobahnjs": "~0.8.0", + "when": "~2.7.0" }, "devDependencies": { "mocha": "latest",