Last active
May 8, 2018 15:31
-
-
Save AllenFang/733be58b394a7f58b5866852cf54bab5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function patchManifest(done) { | |
const tasks = countryList.map((countryName) => { | |
function patchManifestByCountry() { | |
return | |
gulp.src(`./build/${countryName}/manifest.json`) | |
.pipe(gulpJsonTransform((data) => { | |
data.homepage_url = .....; | |
return data; | |
})) | |
.pipe(gulp.dest(`./build/${countryName}/`)); | |
} | |
// Use funciton.displayName to custom the task name | |
patchManifestByCountry.displayName = `patch_${countryName}_manifest`; | |
return patchManifestByCountry; | |
}); | |
// The final task is still a anonymous function, you can fix it like above solution! | |
return gulp.series(...tasks, (seriesDone) => { | |
seriesDone(); | |
done(); | |
})(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment