-
Notifications
You must be signed in to change notification settings - Fork 11
Relecture de assets.md
#14
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
Conversation
Update configuration.md
Signed-off-by: Bruno Lesieur <bruno.lesieur@gmail.com>
Signed-off-by: Bruno Lesieur <bruno.lesieur@gmail.com>
en/guide/assets.md
Outdated
|
||
By default, [vue-loader](http://vue-loader.vuejs.org/en/) automatically processes your style and template files with `css-loader` and the Vue template compiler. In this compilation process, all asset URLs such as `<img src="...">`, `background: url(...)` and CSS `@import` are resolved as module dependencies. | ||
Par défaut, [vue-loader](http://vue-loader.vuejs.org/en/) traite automatiquement vos fichiers de style et vos templates à l'aide de `css-loader` et du compilateur de template de Vue. Dans ce processus de compilation, toutes les URL des fichiers comme `<img src="...">`, `background: url(...)` et les CSS `@import` sont résolus en tant que dépendances des modules. |
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.
"vos fichiers de styles"
en/guide/assets.md
Outdated
- `url-loader` allows you to conditionally inline a file as base-64 data URL if they are smaller than a given threshold. This can reduce a number of HTTP requests for trivial files. If the file is larger than the threshold, it automatically falls back to `file-loader`. | ||
Leurs avantages sont: | ||
- file-loader vous laisse définir ou copier les ressources, comment les nommer et vous permet d'utiliser des hashs de version pour un meilleur cache. | ||
- url-loader vous permet d'insérer de façon conditionnelle un fichier en tant qu'URL encodé en base 64 si sa taille est inférieure à un seuil donné. Cela peut réduire un certain nombre de demandes HTTP pour les fichiers triviaux. Si la taille du fichier est supérieur au seuil, il retombe automatiquement sur file-loader. |
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.
"URL encodée"
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.
Dans tout les projets Vue nous utilisons la voie masculine pour un URL à savoir, un Uniform Resource Locator, c.-à-d. un localisateur uniforme de ressource.
URL est invariable en français aussi URLs n'est pas valide. Par contre une URL n'est pas faux du tout car le genre est « hésitant ». C'est juste qu'on prend le parti masculin, je pense continuer ainsi pour Nuxt.
— https://fr.wiktionary.org/wiki/URL
Idem nous utilisons le terme la SEO pour la Search Engine Optimization soit l'optimisation pour moteur de recherche.
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.
Et oui à l'orale je dis une URL et une Game Cube. Je fais des efforts tout de même pour rectifier ça :D
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.
Je t'avoue que j'utilise également le féminin pour URL (et pour Game Cube ^^).
Utilisons URL au masculin alors (et je me ferais au terme féminin SEO)
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.
D'après un sondage Twitter seulement 20% des sondés disent la SEO. Moi ce qui m'a étonné c'est que quand même 20% disaient la SEO XD. Mais c'est histoire d'être consistant avec moi même. Je peux pas décemment continuer à dire un SEO alors que je dis une SPA.
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.
D'après un sondage Twitter seulement 20% des sondé disent la SEO. Moi ce qui m'a étonné c'est que quand même 20% disait la SEO XD
Ahahahah exact. Bon du coup celui-ci c'est ok!
en/guide/assets.md
Outdated
- `url-loader` allows you to conditionally inline a file as base-64 data URL if they are smaller than a given threshold. This can reduce a number of HTTP requests for trivial files. If the file is larger than the threshold, it automatically falls back to `file-loader`. | ||
Leurs avantages sont: | ||
- file-loader vous laisse définir ou copier les ressources, comment les nommer et vous permet d'utiliser des hashs de version pour un meilleur cache. | ||
- url-loader vous permet d'insérer de façon conditionnelle un fichier en tant qu'URL encodé en base 64 si sa taille est inférieure à un seuil donné. Cela peut réduire un certain nombre de demandes HTTP pour les fichiers triviaux. Si la taille du fichier est supérieur au seuil, il retombe automatiquement sur file-loader. |
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.
J'accorderais "taille" et "supérieur" -> "Si la taille du fichier est supérieure"
en/guide/assets.md
Outdated
```html | ||
<img src="/_nuxt/img/image.0c61159.png"> | ||
``` | ||
|
||
If you want to update these loaders or disable them, please use [build.extend](/api/configuration-build#extend). | ||
Si vous désirez modifier ou désactiver ces loaders, consultez la documentation sur [La propriété `extend`](/api/configuration-build#extend). |
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.
"[la propriété extend
]"
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.
J'utilise la norme que nous avons établie ce matin même. La page aura pour titre « La propriété extend
» donc majuscule. (Tu te souviens Mises en page et Vue) ;)
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.
Oui, et j'ai été voir la section qui s'appelle uniquement extend
non? ^^
Ou tu projettes de changer le nom de la 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.
Est-ce qu'on utiliserait pas plutôt "[la propriété extend
de la page Propriété]" dans ce cas?
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.
Autant pour moi
en/guide/assets.md
Outdated
|
||
From your code you can then reference those files with `/` URLs 8000 : | ||
À partir de votre code vous pouvez ensuite référencer ces fichiers avec de URL commencant par `/` : |
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.
"de URL"?
Signed-off-by: Bruno Lesieur <bruno.lesieur@gmail.com>
Signed-off-by: Bruno Lesieur <bruno.lesieur@gmail.com>
Signed-off-by: Bruno Lesieur <bruno.lesieur@gmail.com>
Merci pour ta revue et ton œil vif @rspt ! C'est tout bon normalement. |
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.
2 petites remarques
en/guide/assets.md
Outdated
|
||
```js | ||
createElement('img', { attrs: { src: require('~/assets/image.png') }}) | ||
``` | ||
|
||
Because `.png` is not a JavaScript file, nuxt.js configures Webpack to use [file-loader](https://github.com/webpack/file-loader) and [url-loader](https://github.com/webpack/url-loader) to handle them for you. | ||
Puisque que les fichiers `.png` ne sont pas des fichiers JavaScript, Nuxt.js configure webpack afin d'utiliser [file-loader](https://github.com/webpack/file-loader) et [url-loader](https://github.com/webpack/url-loader) afin de pouvoir s'en charger. |
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.
Nuxt.js configure webpack afin d' pour utiliser file-loader et url-loader afin de pouvoir s'en charger à votre place.
cela permet d'éviter la répétition de "afin"
en/guide/assets.md
Outdated
|
||
When launching our application with `nuxt`, our template in `pages/index.vue`: | ||
Lors du lancement de notre application avec `nuxt`, notre modèle dans `pages/index.vue` : |
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.
modèle => template
je laisserai "template" puisque c'est la balise dans le fichier .vue
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.
Tout à fait !
Merce @forresst ! Bon pour merge ? |
C'est bon pour moi 👏 |
Go les assets