-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
62 lines (45 loc) · 1.41 KB
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
require("gulp");
var gulp = require('gulp');
const git = require('gulp-git');
const sass = require('gulp-sass')(require('sass'));
var sassdoc = require('sassdoc');
var gutil = require('gulp-util')
var ftp = require('vinyl-ftp')
function Descarga(cb){
git.clone('https://github.com/Chelu97/Proyecto-Final-Miguel.git', {args: './proyecto/'}, function (err){
});
cb();
}
exports.Descarga = Descarga;
function compilarSass() {
return gulp.src('scss/scss/bootstrap.scss', { allowEmpty: true })
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest('./compilado/css/'))
}
exports.compilarSass = compilarSass;
gulp.task('sassdoc', function () {
return gulp.src('scss/scss/**/*.scss')
.pipe(sassdoc());
});
/** Configuration **/
var user = ''
var password = ''
var localFiles = ['./**/*','./sassdoc/**/*','*.ico','*.js','*.html'];
var remoteFolder = '/public_html/spreadinghope'
// helper function to build an FTP connection based on our configuration
function getFtpConnection(){
return ftp.create({
protocol: "ftp",
host : 'ftp.axiomaprint.net',
port : 21,
user: user,
password: password,
log: gutil.log
});
}
gulp.task('remote-deploy', function(){
var conn = getFtpConnection();
return gulp.src(localFiles, {base: '.', buffer: false})
.pipe(conn.newer(remoteFolder))
.pipe(conn.dest(remoteFolder))
})