json - How do I save a result of javascript to a file in gulp -


to lower client machine overhead, want save json result of javascript file build step using gulp. how can this?

this should work (it's untested):

var js = require('./js-file.js'),     fs = require('fs');  fs.writefilesync('./output.json', js.returnmethod()); 

you append existing task or add separate, dedicated one.


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

c# - Exception when attempting to modify Dictionary -