Welcome to mirror list, hosted at ThFree Co, Russian Federation.

packer.js « examples « tar « node_modules - github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ebe38926e1a9414fbe0f0912686934bb6496bb45 (plain)
1
2
3
4
5
6
7
8
9
10
var tar = require("../tar.js")
  , fstream = require("fstream")
  , fs = require("fs")

var dir_destination = fs.createWriteStream('dir.tar')

// This must be a "directory"
fstream.Reader({ path: __dirname, type: "Directory" })
  .pipe(tar.Pack({ noProprietary: true }))
  .pipe(dir_destination)