Commit b57bc321 authored by Святослав Пожидаев's avatar Святослав Пожидаев
Browse files

Измененн gulpfile

- иправлены пути к отслеживаемым файлам
parent 9daafed6
......@@ -9,31 +9,42 @@ const babel = require('gulp-babel');
const include = require('gulp-include');
const uglify = require('gulp-uglify');
const html = require('gulp-html-extend');
const ftp = require('vinyl-ftp');
const paths = {
styles: {
watch: './src/stylesheets/**/*',
watch: [
'src/stylesheets/**/*.scss',
'src/stylesheets/**/*.sass'
],
input: './src/stylesheets/application.sass',
output: './build/stylesheets/'
},
scripts: {
watch: './src/javascripts/**/*',
watch: 'src/javascripts/**/*.js',
application: './src/javascripts/application.js',
vendor: './src/javascripts/vendor.js',
output: './build/javascripts/'
},
images: {
watch: './src/images/**/*',
input: './src/images/**/*',
watch: [
'src/images/**/*.jpg',
'src/images/**/*.jpeg',
'src/images/**/*.png',
'src/images/**/*.gif',
'src/images/**/*.bmp',
'src/images/**/*.svg',
],
input: './src/images/**/*.*',
output: './build/images/'
},
html: {
watch: './src/views/**/**/*',
watch: 'src/views/**/*.html',
input: './src/views/pages/*.html',
output: './build/'
},
fonts: {
watch: './src/fonts/**/*',
watch: 'src/fonts/**/*',
input: './src/fonts/**/*',
output: './build/fonts/'
}
......@@ -83,7 +94,7 @@ gulp.task('webserver', function() {
gulp.task('watch', function() {
gulp.watch(paths.styles.watch, ['styles']);
gulp.watch(paths.scripts.watch, ['scripts:vendor', 'scripts:application']);
gulp.watch(paths.images.watch, ['images']);
gulp.watch(paths.images.watch, ['image']);
gulp.watch(paths.html.watch, ['html']);
gulp.watch(paths.fonts.watch, ['fonts']);
});
......@@ -106,4 +117,27 @@ gulp.task('build', [
'html',
'image',
'fonts'
]);
\ No newline at end of file
]);
gulp.task('deploy', function () {
const conn = ftp.create({
host: 'moskabel.rsrf.ru',
user: 'moskabel',
password: 'qtc09fce6xU6m6ciQTv1',
parallel: 10
});
const globs = [
'./build/fonts/**/*',
'./build/images/*',
'./build/javascripts/*',
'./build/stylesheets/*',
'./build/*.html',
];
return gulp.src(globs, { base: './build', buffer: false })
.pipe(conn.newer('./www/moskabel.rsrf.ru/'))
.pipe(conn.dest('./www/moskabel.rsrf.ru/'));
});
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment