opencollective / opencollective-cli

Command Line Interface for Open Collective
MIT License
17 stars 12 forks source link

change to the newer lightweight postinstall #11

Closed monkeywithacupcake closed 6 years ago

monkeywithacupcake commented 6 years ago

changing to https://github.com/opencollective/opencollective-postinstall

monkeywithacupcake commented 6 years ago

Tested on Open Collective redux-form

monkeywithacupcake commented 6 years ago

Hi @xdamman - I think that I may need to add opencollective-postinstall to this return execSync - I'm not super sure. I've been digging all over the code trying to figure out where it should be installed - since we add it to the package json ...or maybe I don't need it?

if (fs.existsSync(path.join(projectPath, "package.json"))) {
        pkg = getPackageJSON(projectPath);
        if (!pkg.dependencies || !pkg.dependencies.opencollective) {
          console.log("Running npm install --save opencollective");
          return execSync(`npm install --save opencollective >> ${logsFile} 2>&1`, { cwd: projectPath });
        }
      }
    });
xdamman commented 6 years ago

Can you point to the right place in the script? I couldn't find this snippet in the code in this repo.

monkeywithacupcake commented 6 years ago

line 130 of setup.js in setup branch: https://github.com/opencollective/opencollective-cli/blob/setup/src/commands/setup.js

xdamman commented 6 years ago

ah yes, seems indeed like this should be opencollective-postinstall.

monkeywithacupcake commented 6 years ago

Ok. I changed that and I'll be moving forward with these again. THANK YOU.