Skip to content
This repository was archived by the owner on Sep 3, 2024. It is now read-only.

[Doc EN]: modules.md review. #267

Merged
merged 2 commits into from
Oct 2, 2017
Merged

[Doc EN]: modules.md review. #267

merged 2 commits into from
Oct 2, 2017

Conversation

MachinisteWeb
Copy link
Contributor

@MachinisteWeb MachinisteWeb commented Sep 30, 2017

In our French translation/review we have changed some consistent things, so we suggest you do the same in the original documentation.

More details in comments.

Do not hesitate to set back the original behavior for some changes if you think they do not make sense.

Signed-off-by: Bruno Lesieur <bruno.lesieur@gmail.com>
@MachinisteWeb MachinisteWeb changed the title Review of modules.md [Doc EN]: modules.md review. Sep 30, 2017
Copy link
Contributor Author

@MachinisteWeb MachinisteWeb left a comment

Choose a reason for hiding this comment

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

I guess Git Localize is responsible for bad line consistency for file :D

- Are a member of an **agile team** that want to set up your project instantly and avoid **re-inventing** the wheel for common tasks like google-analytics for your new project.
Another point of using modules is that they can be refactored and packaged out of the project and released as npm packages so you can share and use high quality integration and solutions from Nuxt community with no pain! You might interested in modules if you:

- Are a member of an **agile team** that want to set up your project instantly and avoid **re-inventing** the wheel for common tasks like Google Analytics tools for your new project.
- Are an **enterprise** company which **quality** and **reusability** is important for your projects.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure @atinux but the usage of enterprise company is not redundant? Maybe documentation would say enterprise or company?
I always thinking this word was switchable but not additives?

I'm wrong XD?

Modules are basically **functions** which are called sequentially when booting Nuxt and core awaits for all of them
to be finished before continue it's job. So they have the chance to customize almost any aspect of Nuxt and thanks to modular design of nuxt itself and Webpack [Tapable](https://github.com/webpack/tapable) technology they can also register hooks
for certain entry points like builder initialization.
While developing production grade application using Nuxt, you will find out soon that Nuxt core functionalities are not enough and writing configs and plugins for each project is a repetitive, boring and time consuming job. Also adding every new feature into Nuxt is not possible as it would make it a fat framework.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

One line Markdown convention.


Another point of using modules is that they can be refactored and packaged out of the project and released as NPM packages
so you can share and use high quality integration and solutions from nuxt community with no pain! You might interested in modules if you:
This was the reason Nuxt introduces a higher order modular system to easily extend the core. Modules are basically **functions** which are called sequentially when booting Nuxt and core awaits for all of them to be finished before continue it's job. So they have the chance to customize almost any aspect of Nuxt and thanks to modular design of Nuxt itself and webpack [Tapable](https://github.com/webpack/tapable) technology they can also register hooks for certain entry points like builder initialization.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

One line Markdown convention.


- Are a member of an **agile team** that want to set up your project instantly and avoid **re-inventing** the wheel for common tasks like google-analytics for your new project.
Another point of using modules is that they can be refactored and packaged out of the project and released as npm packages so you can share and use high quality integration and solutions from Nuxt community with no pain! You might interested in modules if you:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Return line Markdown convention.


**modules/simple.js**

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Return line Markdown convention.


**module.js**

```js
module.exports = function (moduleOptions) {
if (moduleOptions.fontAwesome !== false) {
// Add font-awesome
// Add Font Awesome
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Product name


**module.js**

```js
module.exports = function (moduleOptions) {
this.extendBuild((config, { isClient, isServer }) => {
// .foo Loader
// `.foo` Loader
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Tick in comment

@@ -305,7 +287,7 @@ module.exports = function () {

// Add hook for build
this.nuxt.plugin('build', async builder => {
// This Will be called once when builder created
// This will be called once when builder created
Copy link
Contributor Author

Choose a reason for hiding this comment

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

remove capital

@@ -315,12 +297,9 @@ module.exports = function () {

// Add hook for generate
this.nuxt.plugin('generate', async generator => {
// This Will be called when a nuxt generate starts
// This will be called when a Nuxt generate starts
Copy link
Contributor Author

Choose a reason for hiding this comment

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

remove capital

<p class="Alert">There are many many more hooks and possibilities for modules. Please refer to [Nuxt Internals](/api/internals) to learn more about Nuxt internal API.</p>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

One line markdown convention

@MachinisteWeb
Copy link
Contributor Author

MachinisteWeb commented Sep 30, 2017

All comment are informative @atinux, just this one is relevant:

I'm not sure @atinux but the usage of enterprise company is not redundant? Maybe documentation would say enterprise or company?
I always thinking this word was switchable but not additives?
I'm wrong XD?

Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

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

Thanks for your time :)

Signed-off-by: Bruno Lesieur <bruno.lesieur@gmail.com>
@MachinisteWeb
Copy link
Contributor Author

😃

@atinux
Copy link
Member

atinux commented Oct 2, 2017

I agree, if we can avoid talknig about entreprise or company, it's nicer!

Merging, thanks @haeresis 👏

@atinux atinux merged commit 0c36bb6 into nuxt:master Oct 2, 2017
@MachinisteWeb MachinisteWeb deleted the modules branch October 2, 2017 14:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants