-
-
Notifications
You must be signed in to change notification settings - Fork 865
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
Issue #365 - Added option to override package manager. #427
Conversation
I'm slowly seeing the JS hemisphere moving back to npm, but correct me if I'm wrong. |
Of course, all the relevant readme files should now be updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why lockfiles are in this commit. May need to open a new PR
@@ -22,6 +22,10 @@ exports.exampleHelp = function() { | |||
)}`; | |||
}; | |||
|
|||
exports.packageManagerHelp = function() { | |||
return `Wich package manager (npm or yarn) to utilize for setup.`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which***
Is there a way to automatically tell based on whether user has called this with |
I fixed the spelling error. Let me know if you want me to open a new pull request where I reset the lockfiles to the versions present on current master. As far as I could see with some light searching, there is no way to detect if it was done through yarn create or directly, since according to https://yarnpkg.com/lang/en/docs/cli/create/ yarn create is equal to
where the end result is the same as if you had installed create-react-app globally with any packagemanager and ran the command directly. If you have any suggestions where to look for making it work, please let me know though and I'd be happy to look into it further. |
I've done a little research by running So, short answer to @jaredpalmer's question: Nope. |
Scratch that, ppid only exists in 9.2+ and it does appear to return the yarn pid, but then again, that version has only been out for 2 months. |
Fix incorrect link to chunk scripts caused by string concatenation instead of incrementing the port number value. `process.env.*` values are strings, so in the example file port value was `'30001'` instead of `3001`.
Mirroring the patch for react-dev-utils that causes dev utils to break in IE11. strip-ansi package arrow function is causing this issue. See react-dev-utils patch PR that was accepted to fix this issue: facebook/create-react-app#2692
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
Hola! So here's the deal, between open source and my day job and life and what not, I have a lot to manage, so I use a GitHub bot to automate a few things here and there. This particular GitHub bot is going to mark this as stale because it has not had recent activity for a while. It will be closed if no further activity occurs in a few days. Do not take this personally--seriously--this is a completely automated action. If this is a mistake, just make a comment, DM me, send a carrier pidgeon, or a smoke signal. |
ProBot automatically closed this due to inactivity. Holler if this is a mistake, and we'll re-open it. |
Implemented parameter for create-razzle-app to override package manager, could resolve #365 if useable.
create-razzle-app my-project -p npm
-p --packageManager
npm
,yarn
Tested this on mac using
npx ./razzle/packages/create-razzle-app/bin/create-razzle-app test-razzle-project -p npm
cd test-razzle-project
npm start
If the option is not supplied it defaults to old behaviour, otherwise checks that it is one of
yarn
ornpm
, and defaults to old behaviour if not. Could remove check foryarn
ornpm
if you want to enable any value to be used.Due to the sentence above I was unsure wether to set the default to npm, but currently it default to yarn as previously done. Could be changed if desired.
I hope you find this useful, even though the issue was marked as low priority.
Some yarn lockfiles unrelated to my modifications appear to have many changes. I'm not very familiar with the inner workings of yarn, but I suspect it might be due to newer yarn version when I ran the initial yarn setup?