mirror of
https://github.com/zhigang1992/npm.git
synced 2026-06-14 09:49:14 +08:00
10 lines
295 B
JavaScript
10 lines
295 B
JavaScript
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) |