- Un archivo gulpfile.js donde se colocarán todas las configuraciones del proyecto.
Sólo se instala una vez de manera global
npm install --global gulp-cli
Estos comandos deben ejecutarse en cada proyecto que vaya a ser utilizado Gulp.
npm i // npm install
npm init
npm install --save-dev gulp
npm install --save gulp-htmlmin ##Minifica y limpia nuestro HTML
npm i --save-dev gulp-postcss cssnano autoprefixer
npm i --save-dev gulp-purgecss ##Limpiar el CSS que no se usa.
npm i --save-dev gulp-terser-js ##Minifica el codigo JS
npm i --save-dev [email protected] ##Aligerar imágenes.
npm i --save-dev gulp-cache ##Ayuda a procesar las imágenes en caché.
npm i --save-dev gulp-webp ##Convierte imágenes a webp.
npm i --save-dev gulp-avif ##Convierte imágenes a Avif.
npm i --save-dev gulp-plumber ##Evita que se detenga la ejecución al presentar errores.
npm i --save-dev gulp-concat ##Une todos nuestros archivos en uno solo.
npm i --save-dev gulp-cache-bust ##Limpia la caché
npm i --save-dev gulp-sourcemaps