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/update concepts #1883

Merged
merged 3 commits into from
Mar 6, 2018
Merged

Conversation

EugeneHlushko
Copy link
Member

Fixes #1870

@EugeneHlushko
Copy link
Member Author

@jeremenichelli i am not entirely sure that covers it or if format is correct, please have a look

@TheDutchCoder
Copy link
Collaborator

Hi @EugeneHlushko thanks for this contribution!

I will PR this against the next branch, but I do have some feedback, so I'll assign myself as the reviewer so we can work on this!

@TheDutchCoder TheDutchCoder self-requested a review March 6, 2018 14:30
@TheDutchCoder TheDutchCoder changed the base branch from master to next March 6, 2018 14:30
Copy link
Collaborator

@TheDutchCoder TheDutchCoder left a comment

Choose a reason for hiding this comment

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

Some minor changes, but other than that it looks good!

@@ -33,6 +34,8 @@ Every dependency is then processed and outputted into files called *bundles*, wh

You can specify an entry point (or multiple entry points) by configuring the `entry` property in the [webpack configuration](/configuration).

T> `entry` defaults to `./src`
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think this needs to be a tip, you can just add it to the introductory paragraph and mention that ./src is the default value for the entry property.

@@ -50,6 +53,8 @@ T> You can configure the `entry` property in various ways depending the needs of

The **output** property tells webpack where to emit the *bundles* it creates and how to name these files. You can configure this part of the process by specifying an `output` field in your configuration:

T> `output.path` defaults to `./dist`
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same for this one, just mention it in the intro paragraph.


## Mode

By choosing between `development` and `production` **mode** you can enable webpack's automatic optimizations according to selected option.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would maybe change this to: "By setting the mode parameter to either development or production, you can enable webpack's built-in optimizations that correspond with the selected mode."

};
```

[Learn more!](/concepts/mode)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think this page exists (yet), so better take this out for now :)

Copy link
Member Author

Choose a reason for hiding this comment

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

But i did add it within the pr

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh yeah, completely missed that because of the branch switch, sorry about that!

@EugeneHlushko
Copy link
Member Author

@TheDutchCoder i did rebase on next for easy reviewing the diff, also fixed 1 lint error. The concepts/mode page was added within this PR, did you review it or missed after changing the target branch?

Copy link
Collaborator

@TheDutchCoder TheDutchCoder left a comment

Choose a reason for hiding this comment

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

Looks great, thanks! 💯 🔥

@TheDutchCoder TheDutchCoder merged commit 0c96dd5 into webpack:next Mar 6, 2018
@EugeneHlushko
Copy link
Member Author

that was fast 🔥🔥🔥

@EugeneHlushko EugeneHlushko deleted the docs/update-concepts branch March 6, 2018 19:09
@TheDutchCoder
Copy link
Collaborator

That's how we roll! 😉
Great work man, thanks a bunch!

@@ -48,7 +49,7 @@ T> You can configure the `entry` property in various ways depending the needs of

## Output

The **output** property tells webpack where to emit the *bundles* it creates and how to name these files. You can configure this part of the process by specifying an `output` field in your configuration:
The **output** property tells webpack where to emit the *bundles* it creates and how to name these files and defaults to `./dist`. You can configure this part of the process by specifying an `output` field in your configuration:
Copy link
Member

Choose a reason for hiding this comment

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

I would change it to: '...files, it defaults to ./dist'

```


or pass it as a cli argument:
Copy link
Member

Choose a reason for hiding this comment

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

CLI, uppercase

webpack --mode=production
```

The following string values are supported:
Copy link
Member

Choose a reason for hiding this comment

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

We should add a note or something clarifying that setting NODE_ENV doesn't set mode automatically, some users are confused by this: webpack/webpack#2537 (comment)

@montogeek
Copy link
Member

It will create a PR with my comments, miss this was merged already

@EugeneHlushko
Copy link
Member Author

thank you very much, comments look very valid 👍

TheLarkInn pushed a commit that referenced this pull request Mar 20, 2018
* adding docs for new `output.devtoolNamespace` option and [namespace] placeholder

* adding extra lines as indicated

* docs(config): update `hashFunction` docs based on v4 (#1761)

* docs(api): reformat index page at 80 characters / line

* docs(api): reformat node api docs and add more details on the compiler

This moves some of the content from `compiler.md` and brings it into the
main node api documentation in order to allow `compiler.md` to become
`compiler-hooks.md` which fits better in the context of plugins.

* docs(api): reformat/rewrite the lead-in plugin docs and remove `tapable.md`

This moves some of the `Tapable` discussion to the lead-in `plugins.md` to
prevent doc duplication. Instead of redocumenting the `tapable` package, we
should focus on improving the README and simply link to there throughout
our docs. As I've mentioned before, we can also create a "Utilities" section
for things other than "Loaders" and "Plugins" that we want to dynamically
pull in.

* docs(api): remove `module-factories.md` and `template.md`

These guides were full of todos and probably lead to more confusion
than clarity. We can discuss more and add them back in once there's
a clear flow for how to incorporate and document them.

* docs(api): reformat line length in plugins.md

* docs(api): rewrite, rename, and resort the `compiler.md` page

This page now focuses specifically on the `hooks` as all the non-plugin related
content was moved to `node.md`. I updated the hooks to the new syntax, added
all undocumented hooks, reformatted each hook as a section to allow more
breathing room, and clarified exactly which `tapable` hook is used for each
section. Still need to get more info on some of the new hooks before we can
ship this...

* docs(api): rewrite, rename, and resort the `compilation.md` page

This page now uses the same section setup as `compiler-hooks.md` and
is up to date with the latest hooks available in the webpack 4 alpha release.

* docs(api): fix sorting and start to reformat the last two plugin pages

* docs(api): begin rewrite of the resolver page

* docs(config): fix header nesting in resolve.md

* docs(api): rename resolvers page for clarity and finish rewrite

* docs(api): make minor corrections to plugin docs

* docs(api): rewrite the parser documentation

Improve lead-in to give a little more context on what the parser does. Add
the latest hooks and use the same layout as the other pages in the section.

* docs(api): update some of the compiler hook descriptions

* docs(plugins): add `ProfilingPlugin` documentation (#1830)

* docs(config): document `info-verbosity` option in watch.md (#1817)

* update tree shaking guide for webpack 4

* docs(Guides): Update Getting Started to use webpack 4

Updates the Get Started guide to use webpack 4 and adds some additional information about npm.

* docs(concepts): Update plugins.md (#1871)

Update the plugins page in the concepts section to be compatible with webpack 4. Also adds a note about referencing the plugin name in camel-case when calling the `tap` method.

* docs(Stats): add `buitlAt` to the example configuration (#1878)

This adds the `builtAt` option to the example configuration.

* docs(guides): add doctype to Get Started (#1874)

This adds valid doctypes to all the HTML examples in the Get Started guide.

* docs(API): add missing config options to cli.md (#1880)

This adds a table of config options for v4 to the API documentation.

* docs(Concepts): update concepts page for v4 (#1883)

This updates the Concepts page to facilitate webpack v4's options and changes.

* update related links to be relevant for webpack 4

* add note about side effects and non-JS files

* add some more advanced usage notes

* docs(concepts) Clarification about NODE_ENV and mode (#1885)

* chore(site): Delete package-lock.json (#1917)

* chore: clean package-lock.json

* chore: sync yarn.lock

* docs(guides): Correct a path error in getting started example (#1899)

* correct a path error in example

* chore: Resolve conflicts on next branch (#1923)

* Update gitignore

* Resolve conflicts

* Resolve conflicts

* docs(api) Fix markdown lint errors

* docs(api) Fix Plugins wording
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants