F
F
fcb-munich2017-01-14 14:42:23
Sass
fcb-munich, 2017-01-14 14:42:23

Why did Gulp stop compiling sass?

Hello! More recently, I started studying layout, taking lessons from YouTube, downloading an optimized template. It seems that everything worked, but at some point the compilation of sass to css stopped working. I have already encountered such a problem and, thanks to the logs in the console, I found that any typo in the code completely cuts down the entire compilation ((But this time even the logs are not displayed. I don’t understand what’s wrong. Here is the galp file:

var gulp = require('gulp'),
sass = require('gulp-sass'),
autoprefixer = require('gulp-autoprefixer'),
cleanCSS = require('gulp-clean-css'),
rename = require('gulp-rename'),
browserSync = require('browser-sync').create(),
concat = require('gulp-concat'),
uglify = require('gulp-uglify');

gulp.task('browser-sync', function() {
browserSync.init({
server: {
baseDir: "./app"
},
notify: false
});
});

gulp.task('styles', function () {
return gulp.src('sass/*.sass')
.pipe(sass({
includePaths: require('node-bourbon').includePaths
}).on('error', sass.logError))
.pipe(rename({suffix: '.min', prefix : ''}))
.pipe(autoprefixer({browsers: ['last 15 versions'], cascade: false}))
.pipe(cleanCSS())
.pipe(gulp.dest('app/css'))
.pipe(browserSync.stream());
});

gulp.task('scripts', function() {
return gulp.src([
'./app/libs/modernizr/modernizr.js',
'./app/libs/jquery/jquery-1.11.2.min.js',
'./app/libs/waypoints/waypoints.min.js',
'./app/libs/animate/animate-css.js',
])
.pipe(concat('libs.js'))
// .pipe(uglify()) //Minify libs.js
.pipe(gulp.dest('./app/js/'));
});

gulp.task('watch', function () {
gulp.watch('sass/*.sass', ['styles']);
gulp.watch('app/libs/**/*.js', ['scripts']);
gulp.watch('app/js/*.js').on("change", browserSync.reload);
gulp.watch('app/*.html').on('change', browserSync.reload);
});

gulp.task('default', ['browser-sync', 'watch']);

If there was a typo and nothing worked, then I ran gulp styles on the command line and it indicated which line it did not understand, but now it just hangs:
Starting 'styles'...
Tell me who knows how to solve this problem? Or tell me a more workable template so that at the initial stage you can concentrate only on layout. I looked all over and didn't find anything useful...

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey Bard, 2017-07-10
@serg_small_developer

Many mailers do not skip the mail function, you need to look for something else

4
4X_Pro, 2017-07-10
@XXXXPro

Website on VDS or regular hosting? If on a VDS, is it configured with an MTA (mail exchange program like sendmail, postfix, etc.)? And is the path to the sendmail utility correct in the PHP settings? Is it possible to send an email via sendmail from the command line?
You also need to check what is specified in the SPF and DMARC of the domain, it may be worth not accepting mail from untrusted hosts there. (Therefore, it is better to make the sender's address in your domain, and not on ya.ru). I can also recommend the msmtp
utility as a simple solution for VDS , it allows you to send mail through a third-party service without an MTA agent.

O
Oleg, 2017-07-10
@politon

Check the possibility of sending at all.
Free hosting can block sending
Create file sendtest.php
With content:

<?php
    error_reporting(E_ALL);
    ini_set('display_errors', '1');
    if (mail("твоя@почта.ru", "Тестовая отправка", "Проверка отправки почты. Успешна")) {
          echo "Письмо отправлено!";
    } else {
           echo "Дрочи хостера";}
    ?>

Throw it in the root of the site and go to http://your_site.ru/sendtest.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question