refile

refile ============== Rewrite files such as xml, json.

npm install refile
8 downloads in the last month

refile

Rewrite files such as xml, json.

requirements

install

    npm install refile -g

how to

step1

Prepare rule file.

var refile = require('refile'),
    TagNameMatcher = refile['matchers']['TagNameMatcher'],
    TagTextConverter = refile['converters']['TagTextConverter'];

module.exports = [
    {
        matcher: new TagNameMatcher('groupId'),
        converters: [
            new TagTextConverter().from('ttt').to('org')
        ]
    }
]

step2

run command

    refile xml rule.js ./target/*.xml

Files will be converted!

npm loves you