halfSource Release half of your source - every second line - as open-source! Simply pass your source- and target-dir. var halfSource = require("./lib/index.js"); halfSource(path.resolve(__dirname, "../test/src"), path.resolve(__dirname,"../test/dest"));