Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make puppeteer peerDependency #108

Open
stereobooster opened this issue Jan 26, 2018 · 4 comments
Open

Make puppeteer peerDependency #108

stereobooster opened this issue Jan 26, 2018 · 4 comments

Comments

@stereobooster
Copy link
Collaborator

stereobooster commented Jan 26, 2018

If I use minimalcss in react-snap it will download two copies of puppeteer. If we make minimalcss-core without CLI and with peerDependency puppeteer and minimalcss with CLI and with puppeteer+minimalcss-core dependency I will be able to use minimalcss-core in react-snap with one copy of puppeteer

Todo this we probably want to use monorepo, see https://github.com/lerna/lerna and https://yarnpkg.com/blog/2017/08/02/introducing-workspaces/

@peterbe
Copy link
Owner

peterbe commented Jan 29, 2018

I have only read about workspaces but if it means we can have one package.json for the cli and one package.json for the "core", that would be awesome.
But what does it mean in terms of npmjs.com?
I do like the idea of splitting the code into smaller parts but I'm quite pessimistic about breaking up the repo.

@stereobooster
Copy link
Collaborator Author

I have only read about workspaces but if it means we can have one package.json for the cli and one package.json for the "core", that would be awesome.

Yes.

But what does it mean in terms of npmjs.com?

It means you will have two separate npm packages, but they will live in one repo for development convenience.

I do like the idea of splitting the code into smaller parts but I'm quite pessimistic about breaking up the repo.

Create-react-app does this, for example.

@peterbe
Copy link
Owner

peterbe commented Jan 29, 2018

Neat! I like this.
Do I need to run jest inside each directory? (not a problem)

@stereobooster
Copy link
Collaborator Author

Do I need to run jest inside each directory?

Yes, but there will be one top level package.json you can create one task which will run all tests in subdirectories

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@peterbe @stereobooster and others