V
V
Vyach Gor2017-04-07 14:35:41
gulp.js
Vyach Gor, 2017-04-07 14:35:41

How to properly hide access when using the vinyl-ftp plugin?

Tired of the next twenty edits a day, I decided to set up vinyl-ftp to upload styles manually.
Task looks like this:

gulp.task( 'ftp', function() {
    var conn = ftp.create( {
        host:     'test',
        user:     ''test,
        password: 'test',
    } );
    var globs = [
        'production/css/main.css',
    ];
    var newerFolder = 'production/css/';
    var path = '/public_html/wp-content/themes/svit-express/css/';
    return gulp.src(globs)
        .pipe( conn.newer(newerFolder) ) // only upload newer files
        .pipe( conn.dest(path) );
} );

Everything works and the styles are deployed, but since I store the sources on github, a reasonable question arose: how to hide access correctly?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vyach Gor, 2017-04-07
@sharnirio

thanks - this is understandable) I formulated it incorrectly - how to correctly create a config with ftp access and connect it to gulpfile.js ! I just see it like this - create a pass.js file in which these variables will be, but I can’t find a working solution anywhere to connect it to gulpfile.js.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question