@@ -22,7 +22,15 @@ grunt.initConfig( {
2222 dest : "dist/resources/sri-directives.json"
2323 }
2424 }
25- }
25+ } ,
26+
27+ wordpress : ( function ( ) {
28+
29+ // This fails with "Cannot find module" if the file does not exist
30+ var config = require ( "./config" ) ;
31+ config . dir = "dist/wordpress" ;
32+ return config ;
33+ } ) ( )
2634} ) ;
2735
2836grunt . registerTask ( "build-index" , function ( ) {
@@ -453,22 +461,12 @@ grunt.registerTask( "ensure-dist-resources", function() {
453461 grunt . file . mkdir ( "dist/resources" ) ;
454462} ) ;
455463
456- grunt . registerTask ( "ensure-wordpress-config" , function ( ) {
457- // This will fail with "Cannot find module" if the file
458- // does not exist
459- var config = require ( "./config" ) ;
460- config . dir = "dist/wordpress" ;
461- grunt . config . merge ( {
462- wordpress : config
463- } ) ;
464- } ) ;
465-
466464grunt . registerTask ( "sri-generate" , [ "ensure-dist-resources" , "sri:generate" ] ) ;
467465
468466// The "grunt deploy" command is automatically invoked on git-commit by the server that
469467// will deploy the WordPress site.
470468// Task tree: "deploy" > "wordpress-deploy" > "build-wordpress" > "build".
471469grunt . registerTask ( "build" , [ "sri-generate" , "build-index" ] ) ;
472- grunt . registerTask ( "deploy" , [ "ensure-wordpress-config" , " wordpress-deploy", "reload-listings" ] ) ;
470+ grunt . registerTask ( "deploy" , [ "wordpress-deploy" , "reload-listings" ] ) ;
473471
474472} ;
0 commit comments