Compile scss


Topic: Compile scss

Ozcan Arslan pro premium priority asked a year ago

I need to use Mega Menu from MDB Pro in Mdb Admin Pro if possible. I copied scss files from mdb pro scss folder into mdb admin pro scss folder but i coulnd't compile scss files?


Marta Szymanska staff pro premium answered a year ago

Hi,

do you receive any specific error message in the console? Please, tell as what exact problems are there, we'll try to help you.

Best, Marta


Ozcan Arslan pro premium priority commented a year ago

I managed to compile using GULP using gulpfile.js below but am i doing right? I can use now Mega Menu with MDB Admin Dashboard and I can't get any other error with any component I am using right now.

const gulp = require('gulp'); const browserSync = require('browser-sync').create(); const sass = require('gulp-sass'); const minifyCSS = require('gulp-csso'); const concat = require('gulp-concat'); const autoprefixer = require('gulp-autoprefixer'); const del = require('del'); const runSequence = require('run-sequence');

gulp.task('browser-sync', () => { browserSync.init({ server: { baseDir: "dist" } }); });

gulp.task('css', () => { return gulp.src('scss/*/.scss') .pipe(sass({ outputStyle: 'nested', precision: 10, includePaths: ['.'] }).on('error', sass.logError)) .pipe(minifyCSS()) .pipe(autoprefixer()) .pipe(concat('mdb.min.css')) .pipe(gulp.dest('dist')) .pipe(browserSync.stream()); });

gulp.task('delete', () => del(['dist']));

gulp.task('watch', () => { gulp.watch("scss/*/.scss", ['css']); });

gulp.task('default', gulp.series('delete', 'css', function (done) { done(); }));


Please insert min. 20 characters.
Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: jQuery
  • MDB Version: 4.8.11
  • Device: Desktop, Mobile
  • Browser: Firefox, Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: No
Tags