samedi 7 mars 2015

Converting `grunt.file.readJSON` to gulp

I'm in the process of converting a Grunt file to a Gulp file. My Grunt file contains the following line



var config = grunt.file.readJSON('json/config.json');


What this line is doing is that it is setting some variables which it then injects into the html it generates, specifically related to languages.


I tried converting the file automatically with grunt2gulp.js but it always fails with config being undefined. How would I write grunt.file.readJSON using gulp?


Aucun commentaire:

Enregistrer un commentaire