From 9c8a80d9b3f3ede22458c7daf6cf5b8fc096fc9c Mon Sep 17 00:00:00 2001 From: Mike Holly Date: Tue, 27 Dec 2011 12:03:19 -0800 Subject: [PATCH] Added an example to the readme --- README.md | 13 ++++++++++++- tests/run.js | 1 - 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5a8b063..335e0b3 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,14 @@ Used to load and save PO files. - var po = require('po'); + var po = require('po') + , fs = require('fs') + + po.load('text.po', function(_po){ + console.log(_po.headers); + console.log(_po.items); + + _po.save('copy.po', function(){ + console.log('We copied a PO file for no reason!'); + }); + }); + \ No newline at end of file diff --git a/tests/run.js b/tests/run.js index 920c67e..bc08325 100644 --- a/tests/run.js +++ b/tests/run.js @@ -1,7 +1,6 @@ var po = require('../lib/po.js') , fs = require('fs') , assert = require('assert') - , exec = require('child_process').exec; po.load('text.po', function(_po){ _po.save('copy.po', function(){