redfin / react-server

:rocket: Blazing fast page load and seamless navigation.
https://react-server.io/
Apache License 2.0
3.89k stars 184 forks source link

[generator-react-server] Attempts to copy .eslintrc which doesn't always exist #967

Open negativetwelve opened 6 years ago

negativetwelve commented 6 years ago

Hi there,

I recently created #966 which fixes one issue with using the generator-react-server package locally rather than globally.

The other issue seems to be this line https://github.com/redfin/react-server/blob/master/packages/generator-react-server/package.json#L51 which assumes we're installing from within the monorepo. In our case, we're installing generator-react-server both without the rest of the monorepo, and we're not installing it globally.

Running npm install or yarn install will run the prepublish step which tries to copy a file that doesn't exist.

Skipping the prepublish step and not having the file will result in an error with the generator because it requires that file to exist and be copied over.

Any ideas what I can do to get around this? Would love to submit a PR that solves this issue.