ijusplab / vue-cli-plugin-gas

Vue CLI plugin for Google Apps Script development using Clasp
11 stars 3 forks source link

More reliable way to check on a clasp install #10

Closed ericnograles closed 1 year ago

ericnograles commented 3 years ago

Summary

There have been issues (#5, #9) reported with this generator not properly seeing globally installed versions of clasp. The original code actually was trying to pull the package.json of clasp from NODE_PATH, which often times is unreliable -- i.e. the developer could be running nvm, n, etc

This PR changes the way this dependency is checked. It does a straight execSync('clasp --version') which should cover the cases above as well as for people who just have one version of Node installed.

This will also make the README.md more consistent, as the direction can just be to do an npm i -g @google/clasp or yarn add global @google/clasp

murashi-sn commented 1 year ago

@ericnograles Thanks! I modified README.