Add autobahn as project dependency

This commit is contained in:
Nicolas Le Goff
2014-02-05 19:12:45 +01:00
parent efc4b61e59
commit 27f1312ef1
3 changed files with 65 additions and 5 deletions

View File

@@ -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

View File

@@ -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"]);
};

View File

@@ -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",