====== GULP ======
GULP est un taskrunner, il sert à automatiser des tâches répétitives.
===== Installation =====
Prérequis : [[prog:nodejs:nodejs|NodeJs]] doit etre installé
> npm init -y
> npm i -D gulp
==== Initialisation de NPM ====
Plus en détails... ''npm init -y'' créé un fichier package.json dans le répertoire de travail.
X:\wiki\test>npm init -y
Wrote to X:\wiki\test\package.json:
{
"name": "test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}
==== Installation de GULP ====
Ensuite ''npm i -D gulp'' lance l'installation de GULP.
Ça mouline pendant de longues minutes //(1372 secondes, 23 minutes... au temps de l'ADSL).//
Ca nous créé un répértoire ''node_modules'' contenant plein de fichiers probablement utiles a GULP.
Et un fichier ''package-lock.json''.
X:\wiki\test>npm i -D gulp
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN test@1.0.0 No description
npm WARN test@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
+ gulp@4.0.2
added 314 packages from 217 contributors and audited 6490 packages in 1372.454s
found 0 vulnerabilities
===== Ressources =====
==== Liens ====
* [[https://blog.soat.fr/2016/08/comment-bien-organiser-son-projet-angular-execution/]]
* [[https://frenchco.de/article/Livereload-avec-Gulp|Utiliser LiveReload avec GULP pour recharger les pages web dés qu'on fait un save]]
==== Vidéos ====
* [[https://www.youtube.com/watch?v=CTY-Q6DyoBs|Tutoriel gulp : Les nouveautés de gulp 4 par Grafikart]]