Skip to content
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

Merged
merged 5 commits into from
Mar 18, 2019

Conversation

gziolo
Copy link
Member

@gziolo gziolo commented Mar 18, 2019

Description

This PR adds a few changes to the existing docs:

  • updated Wepback to webpack to follow how it's phrased on their website
  • links the tutorial from the @wordpress/scripts package's README
  • clarifies that the @wordpress/scripts package provides the recommended config files
  • makes it clear that config can be overridden but this is advanced usage and go against the original idea of the package

@@ -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.
Copy link
Member Author

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.

@gziolo gziolo merged commit 15b87b0 into master Mar 18, 2019
@gziolo gziolo deleted the update/docs-scripts branch March 18, 2019 10:17
packages/scripts/README.md Show resolved Hide resolved
packages/scripts/README.md Show resolved Hide resolved
packages/scripts/README.md Show resolved Hide resolved
packages/scripts/README.md Show resolved Hide resolved
packages/scripts/README.md Show resolved Hide resolved
packages/scripts/README.md Show resolved Hide resolved
packages/scripts/README.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.
Copy link
Contributor

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.

packages/scripts/README.md Show resolved Hide resolved
@gziolo
Copy link
Member Author

gziolo commented Mar 18, 2019

All comments from @mcsf addressed in #14488.

@mkaz or @nosolosw - if you have some more suggestions, feel free to open a follow-up PR. Many thanks for putting this tutorial together. It feels awesome to be able to cross-link those two 💯

@youknowriad youknowriad added this to the 5.3 (Gutenberg) milestone Mar 18, 2019
youknowriad pushed a commit that referenced this pull request Mar 20, 2019
* 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
youknowriad pushed a commit that referenced this pull request Mar 20, 2019
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants