exportify / 0.1.0 last updated 3 years ago created on Jun 14th 2012

Install

npm install --save exportify

Clone

git clone git@github.com:substack/exportify.git

dependencies

main optimist 0.3.7 MIT

maintainers

substack substack

versions

0.1.0 3 years ago substack
0.0.1 4 years ago substack
0.0.0 4 years ago substack
3 Downloads yesterday.

readme

exportify

Generate require()-able javascript files from non-javascript files.

build status

example

command-line usage

1
2
3
4
5
$ for f in files/*.txt; do echo $f:; cat <(echo -n '  ') $f; done
files/a.txt:
  beep
files/b.txt:
  boop
1
2
3
$ /bin/cmd.js -v files/*.txt
files/a.txt
files/b.txt
1
2
3
4
5
$ for f in files/*.js; do echo $f:; cat <(echo -n '  ') $f; done
files/a.txt.js:
  module.exports="beep\n"
files/b.txt.js:
  module.exports="boop\n"

api

var exportify = require('exportify');
var ex = exportify([ 'a.txt', 'b.txt' ]);

ex.on('export', function (file) {
    console.log('exported ' + file);
});

ex.on('end', function () {
    console.log('all done');
});

1
2
3
4
$ node ex.js 
exported files/a.txt
exported files/b.txt
all done

usage

1
2
3
4
5
6
Usage: exportify OPTIONS [files]

  OPTIONS:
    -h, --help     show this message
    -e, --ext      only exportify files with this extension
    -v, --verbose  log a message for every file written

methods

var exportify = require('exportify')

exportify(files, opts={})

For each file in the files array, generate a file + '.js' file that exports the file's contents.

Optionally, if opts.ext is set, only include files in the files list with the opts.ext extension.

install

With npm, to get the command-line tool do:

npm install -g exportify

and to install the library do:

npm install exportify

license

MIT

Resolving all dependencies.. This could take a while as our cache is not yet fully warmed up.