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

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -