From 5da553756c9ee6e1ba8a62efed7a34171cf9599b Mon Sep 17 00:00:00 2001 From: Nicolas Le Goff Date: Thu, 5 Feb 2015 18:49:33 +0100 Subject: [PATCH] Simpler deps --- Gruntfile.js | 56 +++++++++---------------- bower.json | 8 ++-- templates/mobile/common/index.html.twig | 4 +- 3 files changed, 26 insertions(+), 42 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 3c8c06b160..7c82f05264 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -42,22 +42,19 @@ module.exports = function(grunt) { dist: { options: { components: { - "jquery.ui": ["npm", {"../../node_modules/.bin/grunt": "build"}], - "jquery-mobile": ["npm", {"../../node_modules/.bin/grunt": "dist"}], - "bootstrap": ["npm", {"make": "bootstrap"}], - "autobahnjs": [{"make":"build"}] + "bootstrap": ["npm", {"make": "bootstrap"}] } } } }, copy: { - "autobahnjs": { + "autobahn": { "expand": true, "src": [ - "<%= path.bower %>/autobahnjs/build/autobahn.js", - "<%= path.bower %>/autobahnjs/LICENSE" + "<%= path.bower %>/autobahn/autobahn.js", + "<%= path.bower %>/autobahn/LICENSE" ], - "dest": "<%= path.asset %>/autobahnjs/", + "dest": "<%= path.asset %>/autobahn/", "flatten": true }, "backbone": { @@ -106,12 +103,6 @@ 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", @@ -181,12 +172,13 @@ module.exports = function(grunt) { }, "jquery-mobile": { "expand": true, - "cwd": "<%= path.bower %>/jquery-mobile/dist", + "cwd": "<%= path.bower %>/jquery-mobile-bower/", "src": [ "images/*", - "jquery.mobile.css", - "jquery.mobile.js" + "css/jquery.mobile-1.3.2.css", + "js/jquery.mobile-1.3.2.js" ], + "flatten": true, "dest": "<%= path.asset %>/jquery-mobile/" }, "jquery.cookie": { @@ -199,18 +191,17 @@ module.exports = function(grunt) { }, "jquery-ui": { "expand": true, - "cwd": "<%= path.bower %>/jquery.ui", + "cwd": "<%= path.bower %>/jquery-ui", "src": [ - "dist/i18n/*", - "dist/images/*", + "ui/i18n/*", + "ui/*", "themes/base/*", "themes/base/images/*", - "dist/jquery-ui.css", - "dist/jquery-ui.js", "MIT-LICENSE.txt" ], "rename": function(dest, src) { - return dest + src.replace("dist", ""); + var dest = dest + src.replace("ui/", "/"); + return dest.replace("themes/base/", "/") }, "dest": "<%= path.asset %>/jquery.ui/" }, @@ -310,12 +301,13 @@ module.exports = function(grunt) { }, "tinymce": { "expand": true, - "cwd": "<%= path.bower %>/tinymce/js/tinymce", + "cwd": "<%= path.bower %>/tinymce/", "src": [ "plugins/**", "skins/**", "themes/**", - "tinymce.js", + "*.js", + "changelog.txt", "license.txt" ], "dest": "<%= path.asset %>/tinymce" @@ -404,15 +396,8 @@ module.exports = function(grunt) { grunt.loadNpmTasks("grunt-bower-postinst"); grunt.loadNpmTasks('grunt-mocha-phantomjs'); - // 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:autobahn", "copy:backbone", "copy:blueimp", "copy:bootstrap", @@ -449,10 +434,9 @@ module.exports = function(grunt) { grunt.registerTask("install-assets", [ "clean:assets", "bower", - "copy-deps", "bower_postinst", "copy-assets", - "clean:bower" + //"clean:bower" ]); grunt.registerTask('test', ["shell:generate_js_fixtures", "qunit", "mocha_phantomjs"]); -}; +}; \ No newline at end of file diff --git a/bower.json b/bower.json index 68e9ec05d0..310e87eabc 100644 --- a/bower.json +++ b/bower.json @@ -4,8 +4,8 @@ "dependencies": { "bootstrap": "2.3.2", "jquery": "~1.8.3", - "jquery.ui": "~1.10.0", - "jquery-mobile": "~1.3.0", + "jquery-ui": "~1.10.0", + "jquery-mobile-bower": "~1.3.0", "underscore": "~1.4.4", "font-awesome": "~3.0.2", "modernizr": "~2.6.2", @@ -25,7 +25,7 @@ "tinymce": "~4.0", "jquery-galleria": "1.2.9", "jquery.cookie": "~1.4", - "autobahnjs": "~0.8.0", + "autobahn": "~0.9.0", "when": "~2.7.0", "web-socket-js": "~1.0.1", "jquery.treeview": "1.4.1" @@ -42,4 +42,4 @@ "resolutions": { "jquery": "1.8.3" } -} +} \ No newline at end of file diff --git a/templates/mobile/common/index.html.twig b/templates/mobile/common/index.html.twig index 834a332023..f8fb149416 100644 --- a/templates/mobile/common/index.html.twig +++ b/templates/mobile/common/index.html.twig @@ -6,9 +6,9 @@ {{ app['conf'].get(['registry', 'general', 'title']) }} - {{ module_name }} - + - +