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
Post a Comment