Outils pour utilisateurs

Outils du site


web:javascript:grunt:toc

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
web:javascript:grunt:toc [2015/04/20 02:23] – [Étapes] sgariepyweb:javascript:grunt:toc [2022/02/02 00:42] (Version actuelle) – modification externe 127.0.0.1
Ligne 12: Ligne 12:
  
   - Installer Grunt : ''%%$ sudo npm install -g grunt%%''   - Installer Grunt : ''%%$ sudo npm install -g grunt%%''
-  - Installer Watch : ''%%$ sudo npm install grunt-contrib-watch --save-dev%%'' +  - Installer [[https://github.com/gruntjs/grunt-contrib-watch|Watch]] : ''%%$ sudo npm install grunt-contrib-watch --save-dev%%'' 
-  - Installer Include-Source : ''%%$ sudo npm install grunt-include-source --save-dev%%''+  - Installer [[https://github.com/jwvdiermen/grunt-include-source|Include-Source]] : ''%%$ sudo npm install grunt-include-source --save-dev%%''
   - Créer le fichier ''Gruntfile.js'' : <code javascript>   - Créer le fichier ''Gruntfile.js'' : <code javascript>
 module.exports = function(grunt) { module.exports = function(grunt) {
Ligne 22: Ligne 22:
         watch: {         watch: {
             scripts: {             scripts: {
-                files: ['public/app/{,*/}*.js'],+                files: ['public/app/**/*.js'],
                 tasks: ['includeSource'],                 tasks: ['includeSource'],
                 options: {                 options: {
Ligne 70: Ligne 70:
     - ''%%<!-- include: "type": "js", "files": "app/**/*.js" -->%%'' avant la balise de fermeture du corps du HTML (avant ''</body>'').     - ''%%<!-- include: "type": "js", "files": "app/**/*.js" -->%%'' avant la balise de fermeture du corps du HTML (avant ''</body>'').
   - Exécuter Grunt : ''$ grunt''.   - Exécuter Grunt : ''$ grunt''.
-  - Si tout se passe bien, le fichier ''index.html'' sera mis à jour à l'ajout/suppression d'un fichier JavaScript/CSS.+ 
 + 
 +Si tout se passe bien, le fichier ''index.html'' sera mis à jour à l'ajout/suppression d'un fichier JavaScript/CSS. 
 + 
 +==== Sources ==== 
 + 
 +  * Source pour la minification et le cleanup : [[http://www.sitepoint.com/writing-awesome-build-script-grunt/|Writing an Awesome Build Script with Grunt]] 
 +  * [[http://bitflipr.blogspot.ca/2014/08/how-to-get-grunt-and-bower-to-build-and.html|How to get Grunt and Bower to Build and Deploy an Angular Project on OpenShift]] 
web/javascript/grunt/toc.1429489432.txt.gz · Dernière modification : 2022/02/02 00:43 (modification externe)