Skip to content

Relecture de commands.md#19

Merged
MachinisteWeb merged 2 commits intoworkingfrom
commands
Sep 28, 2017
Merged

Relecture de commands.md#19
MachinisteWeb merged 2 commits intoworkingfrom
commands

Conversation

@MachinisteWeb
Copy link
Copy Markdown
Member

Une autre !

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

@forresst forresst left a comment

Choose a reason for hiding this comment

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

Quelques erreurs et remarques


#### Using in package.json
- **`--config-file` ou `-c`:** spécifier le chemin vers le fichier `nuxt.config.js`.
- **`--spa` ou `-s`:** lancer la commande en mode application monopage en désactivant le rendu côté serveur.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

J'aurais conjugué au présent, cela indique l'action qui se passe quand on exécute les commandes :
spécifie le chemin ....
lance la commande ....

à rediscuter

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Bon pour moi

Ensuite, vous pouvez lancer vos commandes via `npm run <command>` (exemple : `npm run dev`).

**PRO TIP:** To pass arguments to npm commands, you need an extra `--` after script name (example: `npm run dev -- --spa`)
<p class="Alert Alert--nuxt-green"><b>Astuce :</b> pour passer des arguments à une commande npm, vous devez utiliser un <code>--</code> supplémentaire au nom de script (exemple : <code>npm run dev -- --spa</code>).</p>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

supplémentaire au après le nom de script

### Déploiement pour un rendu côté serveur (universelle)

To deploy, instead of running nuxt, you probably want to build ahead of time. Therefore, building and starting are separate commands:
Pour déployer, au lieu d'exécuter `nuxt`, vous voulez probablement construire à l'avance. Par conséquent, la construction et le démarrage sont des commandes distinctes :
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

vous voulez probablement faire d'abord la construction construire à l'avance

Il créera un dossier `dist` avec tout à l'intérieur prêt à être déployé sur un hébergement statique.

<div class="Alert">When generating your web application with `nuxt generate`, [the context](/api/context) given to [data()](/guide/async-data#the-data-method) and [fetch()](/guide/vuex-store#the-fetch-method) will not have `req` and `res`.</div>
Si vous avez un projet avec des [routes dynamiques](/guide/routing#dynamic-routes), regarder la [configuration de la commande generate](/api/configuration-generate) afin de dire à Nuxt.js comment générer ces routes dynamiques.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

regarder => regardez


The SPA idea is simple! When spa mode is enabled using `mode: 'spa'` or `--spa` flag and we run build,
generation automatically starts after the build, but this time without pages content and only common meta and resource links.
`nuxt generate` a toujours besoin du SSR pendant le temps de génération afin de prérendre nos pages dans le but d'obtenir un chargement de page rapide et du contenu solide pour la SEO. Le contenu est généré lors de la *phase de build*. Il ne faut par exemple pas l'utiliser pour les applications ou le contenu dépend de l'authentification de l'utilisateur ou pour une API en temps réel (du moins pour le premier chargement).
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Il ne faut pas par exemple pas

Signed-off-by: Bruno Lesieur <bruno.lesieur@gmail.com>
@MachinisteWeb MachinisteWeb merged commit b9d6615 into working Sep 28, 2017
@MachinisteWeb MachinisteWeb deleted the commands branch September 28, 2017 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants