Skip to content

pantojs/panto-transformer-replace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

panto-transformer-replace

NPM version Downloads Build Status Dependency status Dev Dependency status Coverage Status

Replace transformer for panto.

It uses replacestream to replace and receives the same syntax.

panto.loadTransformer('replace');

panto.pick('**/*.js').replace({
    replacements: [
                    [/\bfoo\b/, 'bar'],
                    [/(\d[4]-\d[2]-d[2])/, '$2/$3/$1']
                ]
});

options

  • replacements: Array