Last active
November 26, 2017 10:17
-
-
Save gunaevart/dc9386f4b8d22fe8cae2e52ebc1f3284 to your computer and use it in GitHub Desktop.
Работаем с SASS через GULP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Установка gulp в NPM | |
npm i gulp-cli -g | |
Переходим в папку проекта и ставим gulp локально | |
npm i gulp --save-dev | |
npn init | |
Устанавливаем gulp-sass | |
npm i gulp-sass --save-de | |
Создаём в корне проекта где установлен галп фаил gulpfile.js | |
--Содержание файла-- | |
var gulp = require('gulp'); // Подключаем галп | |
var sass = require('gulp-sass'); // Подключаем галп-сасс | |
gulp.task('sass', function(){ // Создаём таски | |
gulp.src('./css/**/*.scss') // Путь к файлу sass './'-текущая папка '/css/' -папка проекта '/**/' -вложеные папки '/*.scss'- Все файлы с расширением SCSS | |
.pipe(sass()) | |
.pipe(gulp.dest('./css/')) | |
}); | |
gulp.task('sass:watch', function(){ | |
gulp.watch('./css/**/*.scss', ['sass']); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment