]> source.dussan.org Git - jquery-ui.git/commitdiff
Build: Fix manifest dependencies 1240/head
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Wed, 7 May 2014 20:39:21 +0000 (22:39 +0200)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Mon, 12 May 2014 19:52:46 +0000 (21:52 +0200)
Clone bower dependencies instead of reusing and modifying the same object
multiple times.

build/tasks/build.js

index ca8eca9bfb4d486c325c13e20a721206bc4a48ea..1e08dc62f01026e6975c8d5b163432fc3feb1479 100644 (file)
@@ -38,7 +38,7 @@ grunt.registerTask( "manifest", "Generate jquery.json manifest files", function(
                        bower = grunt.file.readJSON( "bower.json" );
 
                Object.keys( plugins ).forEach(function( plugin ) {
-                       var manifest,
+                       var manifest, bowerKey,
                                data = plugins[ plugin ],
                                name = plugin.charAt( 0 ).toUpperCase() + plugin.substr( 1 );
 
@@ -65,11 +65,15 @@ grunt.registerTask( "manifest", "Generate jquery.json manifest files", function(
                                docs: data.docs || replace( baseManifest.docs ||
                                        "http://api.jqueryui.com/{plugin}/" ),
                                download: "http://jqueryui.com/download/",
-                               dependencies: bower.dependencies,
+                               dependencies: {},
                                // custom
                                category: data.category || type
                        };
 
+                       for ( bowerKey in bower.dependencies ) {
+                               manifest.dependencies[ bowerKey ] = bower.dependencies[ bowerKey ];
+                       }
+
                        (baseManifest.dependencies || [])
                                .concat(data.dependencies || [])
                                .forEach(function( dependency ) {