issue90:command_conquer
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
issue90:command_conquer [2015/01/02 15:25] – créée andre_domenech | issue90:command_conquer [2015/02/14 14:40] (Version actuelle) – andre_domenech | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | Clarifications | + | ====== 1 ====== |
+ | |||
+ | **Clarifications | ||
I received some feedback on my last article from the author of the script. As I find some of his corrections/ | I received some feedback on my last article from the author of the script. As I find some of his corrections/ | ||
• Where I said that the line /bin/sh set the environment for Linux, he suggested a more accurate description would be “assigning the default interpreter (here /bin/sh) in order to execute the script”. | • Where I said that the line /bin/sh set the environment for Linux, he suggested a more accurate description would be “assigning the default interpreter (here /bin/sh) in order to execute the script”. | ||
- | • “This pattern can also be a basic regular expression” - He pointed out to me that regular expressions are the default, and you would need the option -F in order to find a literal “.” in the PDF. | + | • “This pattern can also be a basic regular expression” - He pointed out to me that regular expressions are the default, and you would need the option -F in order to find a literal “.” in the PDF.** |
+ | Clarifications | ||
- | In recent months, I’ve dedicated a few articles to web design aspects (Node.js, npm, SASS), and now I’d like to add even more information to this. I’ve recently starting using Bower to install and manage various versions of Foundation and Twitter Bootstrap in various projects. As such, I will cover installing Bower, configuring it, and then configuring Grunt to utilize foundation (after it was installed with Bower). | + | J'ai reçu des commentaires de la part de l' |
+ | |||
+ | • Lorsque j'ai dit que la ligne /bin/sh définissait l' | ||
+ | • « Ce terme peut également être une expression régulière simple ». Il m'a fait remarquer que par défaut on utilise les expressions régulières, | ||
+ | |||
+ | ====== 2 ====== | ||
+ | |||
+ | **In recent months, I’ve dedicated a few articles to web design aspects (Node.js, npm, SASS), and now I’d like to add even more information to this. I’ve recently starting using Bower to install and manage various versions of Foundation and Twitter Bootstrap in various projects. As such, I will cover installing Bower, configuring it, and then configuring Grunt to utilize foundation (after it was installed with Bower). | ||
Why? | Why? | ||
- | You may ask why anyone would want to use Bower to install something like Foundation or Twitter Bootstrap - and the answer is relatively simple. It’s their supported method for installing SASS versions of their frameworks. This means you’ll receive SASS files of Foundation or Bootstrap, enabling you to enable/ | + | You may ask why anyone would want to use Bower to install something like Foundation or Twitter Bootstrap - and the answer is relatively simple. It’s their supported method for installing SASS versions of their frameworks. This means you’ll receive SASS files of Foundation or Bootstrap, enabling you to enable/ |
+ | |||
+ | Ces derniers mois, j'ai consacré quelques articles à des aspects de la conception Web (Node.js, npm, SASS), et maintenant j' | ||
+ | |||
+ | Pourquoi ? | ||
+ | |||
+ | Vous pouvez vous demander pourquoi quelqu' | ||
+ | |||
+ | ====== 3 ====== | ||
- | Install Bower | + | **Install Bower |
Assuming you’ve configured npm as explained in Issue #87, then you’ve done everything required to run the following command: | Assuming you’ve configured npm as explained in Issue #87, then you’ve done everything required to run the following command: | ||
Ligne 27: | Ligne 45: | ||
bower init | bower init | ||
- | Now you’ll be expected to fill in certain information; | + | Now you’ll be expected to fill in certain information; |
- | Installing packages | + | Installer Bower |
+ | |||
+ | En supposant que vous avez configuré npm comme expliqué dans le numéro 87, vous avez alors tout le nécessaire pour exécuter la commande suivante : | ||
+ | |||
+ | npm install -g bower | ||
+ | |||
+ | (Cette commande peut nécessiter un sudo si elle échoue pour l' | ||
+ | |||
+ | Configurer Bower | ||
+ | |||
+ | Ceci créera un fichier bower.json (similaire au fichier package.json de npm). Cela peut être fait de manière interactive ou vous pouvez simplement copier un fichier type et le modifier. Pour la méthode interactive, | ||
+ | |||
+ | bower init | ||
+ | |||
+ | Maintenant il faudra remplir certaines informations ; tout est relativement simple - si vous avez des questions spécifiques, | ||
+ | |||
+ | ====== 4 ====== | ||
+ | |||
+ | **Installing packages | ||
Once the bower.json file is created, you’re ready to install new packages. To do this, and configure the json file for it, you can use the following command: | Once the bower.json file is created, you’re ready to install new packages. To do this, and configure the json file for it, you can use the following command: | ||
Ligne 45: | Ligne 81: | ||
" | " | ||
- | This is the line that tells bower it needs to install foundation as of version 5.4.5, in case you need to re-configure or update the project. | + | This is the line that tells bower it needs to install foundation as of version 5.4.5, in case you need to re-configure or update the project.** |
- | Using Foundation from Bower with Grunt | + | Installer des paquets |
+ | |||
+ | Une fois le fichier bower.json créé, vous êtes prêt à installer de nouveaux paquets. Pour ce faire, et configurer le fichier json pour cela, vous pouvez utiliser la commande suivante : | ||
+ | |||
+ | bower install < | ||
+ | |||
+ | Vous pouvez également utiliser --save, qui ajoutera le paquet à la liste des dépendances dans le fichier bower.json. Comme ces outils sont en cours de développement, | ||
+ | |||
+ | Un exemple : | ||
+ | |||
+ | bower install foundation --save-dev | ||
+ | |||
+ | Cela installera Foundation dans bower_components dans le dossier de votre projet, et ajoutera une ligne à votre fichier bower.json qui ressemble à ceci : | ||
+ | |||
+ | " | ||
+ | |||
+ | C'est la ligne qui dit à bower qu'il doit installer Foundation en version 5.4.5 au moins, au cas où vous avez besoin de reconfigurer ou mettre à jour le projet. | ||
+ | |||
+ | ====== 5 ====== | ||
+ | |||
+ | **Using Foundation from Bower with Grunt | ||
If you followed along the last article I wrote on Grunt, this should seem pretty straightforward. What you need to do is point Grunt to the foundation folder, under bower_components. This means that you’ll need to add (or edit) the foundation line in the project object of your Gruntfile.js. It should look like this: | If you followed along the last article I wrote on Grunt, this should seem pretty straightforward. What you need to do is point Grunt to the foundation folder, under bower_components. This means that you’ll need to add (or edit) the foundation line in the project object of your Gruntfile.js. It should look like this: | ||
Ligne 60: | Ligne 116: | ||
}, | }, | ||
- | Assuming you also want to include the javascript from foundation, you’ll also need to add it to the js area, though generally importing the foundation.min.js file directly into your webpage should suffice. If you use lots of javascript files and want them merged, you will need to point Grunt to each of the files in turn, and configure it to merge and compress them. | + | Assuming you also want to include the javascript from foundation, you’ll also need to add it to the js area, though generally importing the foundation.min.js file directly into your webpage should suffice. If you use lots of javascript files and want them merged, you will need to point Grunt to each of the files in turn, and configure it to merge and compress them.** |
- | And this (along with my previous articles) concludes using SASS within your web project. We have covered: Installing Node.js, npm, grunt, bower, and a framework such as Zurb Foundation. If you combine this information with my articles on setting up git repositories, | + | Utiliser Foundation depuis Bower avec Grunt |
+ | |||
+ | Si vous avez suivi le dernier article que j'ai écrit sur Grunt, cela devrait sembler assez simple. Ce que vous devez faire est de faire pointer Grunt vers le dossier de Foundation, sous bower_components. Cela signifie que vous aurez besoin d' | ||
+ | |||
+ | project: { | ||
+ | css: [ | ||
+ | ' | ||
+ | ], | ||
+ | js: [ | ||
+ | ' | ||
+ | ] | ||
+ | }, | ||
+ | |||
+ | En supposant que vous voulez également inclure le javascript de Foundation, vous aurez également besoin de l' | ||
+ | |||
+ | ====== 6 ====== | ||
+ | |||
+ | **And this (along with my previous articles) concludes using SASS within your web project. We have covered: Installing Node.js, npm, grunt, bower, and a framework such as Zurb Foundation. If you combine this information with my articles on setting up git repositories, | ||
If anyone is interested in further web design articles, please do let me know by email at lswest34+fcm@gmail.com. If you have any other suggestions or requests, feel free to email me those ideas too. | If anyone is interested in further web design articles, please do let me know by email at lswest34+fcm@gmail.com. If you have any other suggestions or requests, feel free to email me those ideas too. | ||
Ligne 68: | Ligne 141: | ||
Further Reading | Further Reading | ||
http:// | http:// | ||
- | http:// | + | http:// |
+ | |||
+ | Et cela (avec mes précédents articles) conclut l' | ||
+ | |||
+ | Si quelqu' | ||
+ | |||
+ | Lectures complémentaires | ||
+ | http:// | ||
+ | http:// |
issue90/command_conquer.1420208705.txt.gz · Dernière modification : 2015/01/02 15:25 de andre_domenech