-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Scripts: use default babel if none is found in project #14168
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
oandregal
changed the title
Add/babel to scripts
Scripts: use default babel if none is found in project
Feb 28, 2019
oandregal
added
[Type] Build Tooling
Issues or PRs related to build tooling
[Tool] WP Scripts
/packages/scripts
labels
Feb 28, 2019
gziolo
reviewed
Mar 4, 2019
oandregal
force-pushed
the
add/defaults-to-scripts-build
branch
from
March 11, 2019 12:15
b9f6973
to
6da9e92
Compare
oandregal
force-pushed
the
add/babel-to-scripts
branch
from
March 11, 2019 13:31
785c91c
to
debef90
Compare
oandregal
force-pushed
the
add/babel-to-scripts
branch
from
March 12, 2019 12:19
debef90
to
01a10f8
Compare
oandregal
requested review from
aduth,
ajitbohra,
mkaz,
nerrad,
ntwb and
youknowriad
as code owners
March 12, 2019 12:19
oandregal
commented
Mar 13, 2019
oandregal
commented
Mar 13, 2019
oandregal
commented
Mar 13, 2019
gziolo
reviewed
Mar 13, 2019
oandregal
force-pushed
the
add/babel-to-scripts
branch
3 times, most recently
from
March 14, 2019 09:38
2dcc4e0
to
eb88287
Compare
gziolo
reviewed
Mar 14, 2019
gziolo
reviewed
Mar 14, 2019
gziolo
reviewed
Mar 14, 2019
It is only used by babel-preset-default. It is looked up by require itself so we need to tell Jest not to substitute with anything.
So we don't need to update it manually.
oandregal
force-pushed
the
add/babel-to-scripts
branch
from
March 14, 2019 16:46
dbbc04b
to
72b4f7d
Compare
gziolo
reviewed
Mar 14, 2019
@@ -7,6 +7,7 @@ const { hasPackageProp } = require( './package' ); | |||
|
|||
const hasBabelConfig = () => | |||
hasProjectFile( '.babelrc' ) || | |||
hasProjectFile( '.babelrc.js' ) || |
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 catch :)
Individual packages shouldn't have node_modules installed in their local paths in a normal Gutenberg operation. Yet, if you `cd packages/<packagename> && npm install` things start going south - like tests not passing.
gziolo
approved these changes
Mar 14, 2019
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.
I tested it very extensively and it all works perfectly fine. Thi is AMAZING. Outstanding work on making it all work!!!
🥇 💯 🚀
This was referenced Mar 18, 2019
youknowriad
pushed a commit
that referenced
this pull request
Mar 20, 2019
youknowriad
pushed a commit
that referenced
this pull request
Mar 20, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
Changes to make Webpack use the
@wordpress/babel-preset-default
babel config if none is found when runningwp-scripts build/start
.Test
npm run dev
and that it works as expected.npm run build
and that it works as expected.