Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# rubius
Абдраев Рахим Радикович
[![Netlify Status](https://api.netlify.com/api/v1/badges/de660e49-3766-4cae-bc08-52b40fce05df/deploy-status)](https://app.netlify.com/sites/funny-lily-79a8c1/deploys)
372 changes: 372 additions & 0 deletions dist/index.html

Large diffs are not rendered by default.

64 changes: 64 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
const { src, dest, series, parallel, watch } = require('gulp');
const sass = require('gulp-sass')(require('sass'));
const clean = require('gulp-clean');
const browserSync = require('browser-sync').create();
const postcss = require('gulp-postcss');
const autoprefixer = require('autoprefixer');
const cssnano = require('cssnano');
const sourcemaps = require('gulp-sourcemaps');

// Таск компиляции SASS в CSS
function buildSass() {
return src('src/scss/**/*.scss')
.pipe(sourcemaps.init())
.pipe(sass({
includePaths: ['./node_modules']
}).on('error', sass.logError))
.pipe(
postcss([
autoprefixer({
grid: true,
overrideBrowserslist: ['last 2 versions']
}),
cssnano()
])
)
.pipe(sourcemaps.write())
.pipe(dest('src/css'))
.pipe(dest('dist/css'))
.pipe(browserSync.stream());
}

// Таск работы с html файлами
function buildHtml() {
return src('src/**/*.html')
.pipe(dest('dist'))
.pipe(browserSync.stream());
}

// Таск копирования статичных файлов
function copy() {
return src(['src/images']).pipe(dest('dist'));
}

// Таск очистки dist
function cleanDist() {
return src('dist', { allowEmpty: true }).pipe(clean());
}

// Таск отслеживания изменения файлов
function serve() {
watch('src/scss/**/*.scss', buildSass);
watch('src/**/*.html', buildHtml);
}

// Создание дев-сервера
function createDevServer() {
browserSync.init({
server: 'src',
notify: false
});
}

exports.build = series(cleanDist, parallel([buildSass, buildHtml, copy]));
exports.default = series(buildSass, parallel(createDevServer, serve));
315 changes: 0 additions & 315 deletions index.html

This file was deleted.

Loading