/*jshint node:true */
"use strict";

var path  = require("path"),
    shell = require("shelljs");

module.exports = function(config) {
    var pkg;
    
    for(pkg in config.package.dependencies) {
        // YUI is copied via its own task
        if(pkg === "yui") {
            continue;
        }
        
        shell.cp("-R", path.join("./node_modules", pkg), path.join(config.temp, "node_modules"));
    }
};

/*jshint node:true */
"use strict";

var path  = require("path"),
    shell = require("shelljs"),
    
    remove = [
        "moment/test",
        "twitter-txt/pkg",
        "config/doc"
    ];

module.exports = function(config) {
    var pkg;
    
    for(pkg in config.package.dependencies) {
        // YUI is copied via its own task
        if(pkg === "yui") {
            continue;
        }
        
        shell.cp("-R", path.join("./node_modules", pkg), path.join(config.temp, "node_modules"));
    }
    
    remove.forEach(function(dir) {
        shell.rm("-rf", path.join(config.temp, "node_modules", dir));
    });
};

Remove big non-critical folders from node_modules
Remove big non-critical folders from node_modules
