scripts/beforePluginInstallHook.js
function createPluginInstalledFlag(ctx) {
  var pathToInstallFlag = path.join(ctx.opts.projectRoot, 'plugins', ctx.opts.plugin.id, INSTALLATION_FLAG_FILE_NAME);

  fs.closeSync(fs.openSync(pathToInstallFlag, 'w'));
}
function createPluginInstalledFlag(ctx) {
  var pathToInstallFlag = path.join(ctx.opts.projectRoot, 'plugins', ctx.opts.plugin.id, INSTALLATION_FLAG_FILE_NAME);

  fs.closeSync(fs.openSync(pathToInstallFlag, 'w'));
}
function createPluginInstalledFlag ( ctx ) { var pathToInstallFlag = path . join ( ctx . opts . projectRoot , 'plugins' , ctx . opts . plugin . id , INSTALLATION_FLAG_FILE_NAME ) ; fs . closeSync ( fs . openSync ( pathToInstallFlag , 'w' ) ) ; }
Create empty file - indicator, that we tried to install dependency modules after installation.
We have to do that, or this hook is gonna be called on any plugin installation.
Create empty file - indicator that we tried to install dependency modules after installation . We have to do that or this hook is gonna be called on any plugin installation .