var path = require('path');

function clean(node) {
    delete node.source.input.css;
    node.source.input.file = path.basename(node.source.input.file);
    if ( node.nodes ) node.nodes = node.nodes.map(clean);
    return node;
}

module.exports = function jsonify(node) {
    var cleaned = clean(node.toJSON());
    return JSON.stringify(cleaned, null, 4);
};

var path = require('path');

function clean(node) {
    delete node.source.input.css;
    node.source.input.file = path.basename(node.source.input.file);
    if ( node.nodes ) node.nodes = node.nodes.map(clean);
    return node;
}

module.exports = function jsonify(node) {
    var cleaned = clean(node.toJSON());
    return JSON.stringify(cleaned, null, 2);
};

Fix indent in jsonify too