Added an example to the readme
This commit is contained in:
parent
1bae2deab0
commit
9c8a80d9b3
13
README.md
13
README.md
@ -1,3 +1,14 @@
|
|||||||
Used to load and save PO files.
|
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!');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
@ -1,7 +1,6 @@
|
|||||||
var po = require('../lib/po.js')
|
var po = require('../lib/po.js')
|
||||||
, fs = require('fs')
|
, fs = require('fs')
|
||||||
, assert = require('assert')
|
, assert = require('assert')
|
||||||
, exec = require('child_process').exec;
|
|
||||||
|
|
||||||
po.load('text.po', function(_po){
|
po.load('text.po', function(_po){
|
||||||
_po.save('copy.po', function(){
|
_po.save('copy.po', function(){
|
||||||
|
Loading…
Reference in New Issue
Block a user