UNPKG

@gravityforms/gulp-tasks

Version:
14 lines (10 loc) 417 B
#!/usr/bin/env node const fs = require( 'fs' ); const path = require( 'path' ); const packageJsonPath = path.join( process.cwd(), 'package.json' ); const backupPath = path.join( process.cwd(), 'package.backup.json' ); if ( fs.existsSync( backupPath ) ) { const originalPackageJson = fs.readFileSync( backupPath, 'utf8' ); fs.writeFileSync( packageJsonPath, originalPackageJson ); fs.unlinkSync( backupPath ); }