wrap up server code in a tarball
CoffeeScript JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
.gitignore
.npmignore
23182620.jpg
Cakefile
LICENSE
README.md
package.json
test.js

README.md

TARBALLIFY ALL THE THINGS!

Put all the things from your server in one tarball.

var fs = require('fs')
var path = require('path')
var tarballify = require('tarballify')

console.log("creating new tarball …")
var tarball = tarballify('./server.js', {
    dirname:__dirname,
    fileList:false, // include a FILES file with a list of all files when true
})
    .register(".node", function (body, file) {
        console.log("skip binary file:", file)
        return "skip binary"
    })
    .on('warn',  function(w){console.warn( "WARN",w)})
    .on('error', function(e){console.error("ERR ",e)})
    .on('skip',  function(s){console.log(  "skip",s.name,s.dirname)})
    .on('wait',  function( ){console.log("waiting for tarball to finish …")})
    .on('append',function(f){console.log("append",f.props.size, "\t",f.path)})
    .on('close', function( ){console.log("done.")})
    .on('syntaxError', function(e){console.error("syntaxError ",e)})
tarball.pipe(fs.createWriteStream(path.join(__dirname, "test.tar.gz")))
tarball.append("README.md")

console.log("setup ok.")
tarball.end()