I
I
Igor Pavlenko2016-03-28 19:54:04
Sass
Igor Pavlenko, 2016-03-28 19:54:04

Compiling sass on the server?

There is a site that is on the server, is it possible to make sass compile to a css file that is also on the server. The only option to access the server is FTP (SFTP). In which direction to dig and is it possible at all?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Artur Masloboev, 2016-03-28
@MrSteep

It is necessary to dig towards the deployment to the server, after compiling from sass. Naturally, various npm plugins can help with this.
For example: https://github.com/sindresorhus/gulp-ftp
The task will look something like this (did not try it)

gulp.task('deploy', function () {
  return gulp.src('src/style.sass')
    .pipe(sass())
    .pipe(rename('style.css')
    .pipe(ftp({
      host: 'website.com',
      user: 'johndoe',
      pass: '1234'
    }));
});

Z
zooks, 2016-03-28
@zooks

Well, what will you do when the Gulp or Grunt task runner crashes on the server?
Development must be done on localhost.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question