Gulp com PHP
Autor: Eurai Criado: 16/06/2024 Atualizado: 19/06/2024Salve salve, blz?
Alguns comandos e configurações recente do GULP.
O mesmo não rodou com node 21. Apenas com node 20.
Também é possível utilizar o NVM
nvm install 20.14.0
nvm use 20.14.0
E instalar, funcionou corretamente
Utilizei para compactar as imagens e concatenar scss.
Erro com node 21 (Uma parte)
npm WARN deprecated osenv@0.1.5: This package is no longer supported.
npm WARN deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if
you want a good and tested way to coalesce async requests by
a key value, which is much more comprehensive and powerful.
package.json
"dependencies": {
"@babel/core": "^7.24.7",
"@babel/preset-env": "^7.24.7",
"@babel/runtime": "^7.24.7",
"gulp-autoprefixer": "^9.0.0",
"gulp-babel": "^8.0.0",
"gulp-concat": "^2.6.1",
"gulp-image": "^6.3.1",
"gulp-jimp": "^1.2.9",
"gulp-rename": "^2.0.0",
"gulp-sass": "^5.1.0",
"gulp-uglify": "^3.0.2",
"gulp-uglifycss": "^1.1.0",
"gulp-webp": "^5.0.0",
"node-sass": "^9.0.0"
},
"devDependencies": {
"gulp": "^5.0.0"
}
gulpfile.mjs
import { src, dest, parallel, watch } from 'gulp';
import uglify from 'gulp-uglify';
import uglifycss from 'gulp-uglifycss';
import rename from 'gulp-rename';
import image from 'gulp-image';
import babel from 'gulp-babel';
import autoprefixer from 'gulp-autoprefixer';
import concat from 'gulp-concat';
import webp from 'gulp-webp';
import jimp from 'gulp-jimp';
import gulpSass from "gulp-sass";
import nodeSass from "node-sass";
const sass = gulpSass(nodeSass);
//Tarefas
export const tjs = parallel(jsConcat, js);
Gostou? Compartilhe com seus amigos e deixe um comentário! 😎
Um abraço, e até a próxima