-
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
Docs: Polish @wordpress/scripts README and related tutorial #14484
Conversation
@@ -1,16 +1,16 @@ | |||
# JavaScript Build Setup | |||
|
|||
This page covers how to set up your development environment to use the ESNext syntax. ESNext is JavaScript code written using features that are only available in a specification greater than ECMAScript 5 (ES5 for short) or that includes a custom syntax such as [JSX](https://reactjs.org/docs/introducing-jsx.html). | |||
This page covers how to set up your development environment to use the ESNext and [JSX](https://reactjs.org/docs/introducing-jsx.html) syntaxes. ESNext is JavaScript code written using features that are only available in a specification greater than ECMAScript 5 (ES5 for short). JSX is a custom syntax extension to JavaScript which helps you to describe what the UI should look like. |
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.
@mkaz - I found this statement confusing and updated it to make it explicit that JSX is not a subset of ESNext as one could understand before.
docs/designers-developers/developers/tutorials/javascript/js-build-setup.md
Show resolved
Hide resolved
## webpack config | ||
#### Advanced information | ||
|
||
It uses [Jest](https://jestjs.io/) behind the scenes and you are able to utilize all of its [CLI options](https://jestjs.io/docs/en/cli.html). You can also run `./node_modules/.bin/wp-scripts test-unit-js --help` or `npm run test:unit:help` (as presented earlier) to view all of the available options. By default, it uses the set of recommended options defined in [@wordpress/jest-preset-default](https://www.npmjs.com/package/@wordpress/jest-preset-default) npm package. You can override them with your own options as described in [Jest documentation](https://jestjs.io/docs/en/configuration). Learn more in the [Advanced Usage](#advanced-usage) section. |
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.
See suggestions for test-e2e
.
* Clarify that JSX is not part of ESNext in JS build setup tutorial * Docs: Polish @wordpress/scripts README and related tutorial * Emphasize that build and start scripts should be used with the default config * Add Advanced information subsection for all scripts * Link the existing tutorial for build and start scripts
* Clarify that JSX is not part of ESNext in JS build setup tutorial * Docs: Polish @wordpress/scripts README and related tutorial * Emphasize that build and start scripts should be used with the default config * Add Advanced information subsection for all scripts * Link the existing tutorial for build and start scripts
Description
This PR adds a few changes to the existing docs:
@wordpress/scripts
package's README@wordpress/scripts
package provides the recommended config files