Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

198
Vistas
Is there an alternative solution for watching and compiling Tailwind CSS / JavaScript using Gulp

I am developing a template for a website that uses CMS. I decided to use Tailwind CSS with SCSS as base, but I also needed something to bundle all styles together + minify them and send them directly via FTP to test server. Then I found Gulp and got it working, by now the main code looks like this:

gulp.task("css", () => {
    const postcss = require("gulp-postcss");
    return gulp
        .src(["./assets/css/styles.scss"])
        .pipe(
            postcss([
                require('postcss-partial-import')({}),
                require("postcss-import"),
                require("postcss-import-url"),
                require("tailwindcss/nesting"),
                require("tailwindcss"),
                require("autoprefixer"),
            ])
        )
        .pipe(sass().on("error", sass.logError))
        .pipe(cleanCSS())
        .pipe(purgeCSS({
            extractors: [
                {
                    extractor: purgeCSSFromHTML,
                    extensions: ['tpl']
                }
            ],
            content: [
                'template/**/*.{html,js,tpl}'
            ],
            variables: false,
            safelist: [
                    "bb-editor",
                    "dtitle",
                    "install",
                    "downlist",
                    "gallery",
                    "ug-gallery-wrapper",
                    "reputation",
                    'tippy',
                    'tippy-box',
            ]
        }))
        .pipe(convertEncoding({to: 'win1251'}))
        .pipe(gulp.dest("template/assets/css"));
});

gulp.task('deploy', function () {

    var conn = ftp.create({
        host: '88.xx.xx.xx',
        user: 'xxx',
        password: 'xxx',
        parallel: 8,
        log: gutil.log
    });

    var globs = [
        'template/**/*.css',
        'template/**/*.tpl',
        'assets/**/*.css',
        'template/**/*.js',
    ];

    return gulp
        .src(globs, { base: './template', buffer: false })
        .pipe(conn.newer('/templates/rework'))
        .pipe(conn.dest('/templates/rework'));
});

But right now I want to migrate to Windi CSS or at least find a better replacement for Gulp, because I noticed that Gulp and it's plugins get less updates and more projects start using Webpack or other bundlers.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda