VIP Search & Replace
How to use this package?
const { replace } = require( '@automattic/vip-search-replace' );
const readableStream = fs.createReadStream( 'path_to_sql_file.sql' );
const writeableStream = fs.createWriteStream( 'path_to_sql_file_replaced.sql', { encoding: 'utf8' } );
const result = await replace( readableStream, [ 'thisdomain.com', 'thatdomain.com' ] );
result.pipe( writeableStream );
Contributing
For details about contributing to this project (e.g. setting up development environment, publishing a release, etc.), please see CONTRIBUTING.md.