Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request resolves Task 3 in the work samples.
I enabled the Plug'n'Play feature when a user creates a new Gatsby site.
New features proposed:
--use-pnp
when creating a new Gatsby site (i.e.gatsby new some-app --use-pnp
)--use-pnp
is flagged,node_modules
will not appearI do show the installation times when it's finished. If I had more time, I would've reached out to someone on the team to fully understand what was wanted from
Installation times should be compared/contrasted via using the flag and not using the flag
. Currently, it just outputs the installation time depending on if it's using PnP or not.I didn't have enough time to write tests but I did manually test it. If I had more time, I would've written some tests for the functions used and compare if the output is what was expected.
Basic testing:
npm link
in thegatsby-cli
node_module
npx gatsby new test --use-pnp
to test PnPnpx gatsby new test
to test without PnPnode_modules
in the new Gatsby siteNote: I referenced
create-react-app
on how to validate if the user is using yarn and if it's the right version as well as the general implementation of PnP.Let me know if you have any questions!