Skip to content

Extract some utilities into a separate package - #723

Merged
gaearon merged 3 commits into
masterfrom
react-dev-utils
Sep 23, 2016
Merged

Extract some utilities into a separate package#723
gaearon merged 3 commits into
masterfrom
react-dev-utils

Conversation

@gaearon

Copy link
Copy Markdown
Contributor

This makes projects cleaner after ejecting!

@gaearongaearon added this to the 0.5.0 milestone Sep 23, 2016
@ghostghost added the CLA Signed label Sep 23, 2016
@fson

fson commented Sep 23, 2016

Copy link
Copy Markdown
Contributor

Need to add utils to files in packages/react-scripts/package.json

@fsonfson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good!
screen shot 2016-09-23 at 20 57 59

@fson

fson commented Sep 23, 2016

Copy link
Copy Markdown
Contributor

Ok, eject in the e2e test still tries to install our packages from npm.

var prompt = require('react-dev-utils/prompt');
prompt(
'Are you sure you want to eat all the candy?',
false

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I always put a comment for boolean variables with what they mean, otherwise it's pretty confusing :)

/* isYesDefault*/false

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even better:

prompt('Are you sure you want to eat all the candy?',{default: false});

@gaearon
gaearon merged commit e5bf5af into masterSep 23, 2016
@gaearon
gaearon deleted the react-dev-utils branch September 23, 2016 19:53
feiqitian pushed a commit to feiqitian/create-react-app that referenced this pull request Oct 25, 2016
* Extract some utilities into a separate package
* Add utils dir to `files` in package.json
* Do not create an empty `utils` dir on eject
@locklockBot locked and limited conversation to collaborators Jan 22, 2019
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@gaearon@fson@vjeux