Gulpfile.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. var gulp = require('gulp');
  2. var sass = require('gulp-sass');
  3. var exec = require('gulp-exec');
  4. gulp.task('styles', function(done) {
  5. gulp.src('gtk-3.20/**/*.scss')
  6. .pipe(sass().on('error', sass.logError))
  7. .pipe(gulp.dest('./gtk-3.20/'))
  8. .pipe(exec(' gsettings set org.gnome.desktop.interface gtk-theme "Dracula"'))
  9. done();
  10. });
  11. gulp.task('shell-style', function(done) {
  12. gulp.src('gnome-shell/**/*.scss')
  13. .pipe(sass().on('error', sass.logError))
  14. .pipe(gulp.dest('./gnome-shell/'))
  15. .pipe(exec('gsettings set org.gnome.shell.extensions.user-theme name "Ant"'))
  16. .pipe(exec('gsettings set org.gnome.shell.extensions.user-theme name "Dracula"'))
  17. done();
  18. });
  19. gulp.task('cinnamon-style', function(done) {
  20. gulp.src('cinnamon/**/*.scss')
  21. .pipe(sass().on('error', sass.logError))
  22. .pipe(gulp.dest('./cinnamon/'))
  23. .pipe(exec(' gsettings set org.cinnamon.desktop.interface gtk-theme "Dracula"'))
  24. .pipe(exec(' gsettings set org.cinnamon.desktop.wm.preferences theme "Dracula"'))
  25. .pipe(exec(' gsettings set org.cinnamon.theme name "Dracula"'))
  26. done();
  27. });
  28. //Watch task
  29. gulp.task('default',function() {
  30. gulp.watch('gtk-3.20/**/*.scss', gulp.series('styles'));
  31. });
  32. gulp.task('shell',function() {
  33. gulp.watch('gnome-shell/**/*.scss', gulp.series('shell-style'));
  34. });
  35. gulp.task('cinnamon',function() {
  36. gulp.watch('cinnamon/**/*.scss', gulp.series('cinnamon-style'));
  37. });