turbo
2f2fd787 - feat(turbo): add main pointing to bin (#5333)

Commit
3 years ago
feat(turbo): add main pointing to bin (#5333) ### Description <!-- ✍️ Write a short summary of your work. If necessary, include relevant screenshots. --> Add a `package.json` `main` filed so that `require.resolve` works. ### Testing Instructions ``` // before require.resolve('turbo'); // Throws module not found error // After require.resolve('turbo'); // /path/to/turbo/bin/turbo ``` Many tools rely on `require.resolve` to find where a package was installed. Adding this field to the cli package shouldn't change any behaviors when using the package in currently documented ways. The only downside here is that this package does not export javascript, so this will mean that someone require/import'ing the package will get a different error. AFAIK there is no other reliable way to find where on disk a package was installed than `require.resolve`, so `main` being missing would have errored for those folks anyway. Co-authored-by: Alexander Lyon <arlyon@me.com>
Author
Parents
Loading