ixkaito / frasco

Quick starter for Jekyll including full setup for Sass, PostCSS, Autoprefixer, stylelint, TypeScript, Webpack, ESLint, imagemin, Browsersync, etc.
https://ixkaito.github.io/frasco/
MIT License
131 stars 20 forks source link

gulp-sass only copies the main scss file now. #35

Closed edheltzel closed 5 years ago

edheltzel commented 5 years ago

gulp-sass is copying over the folder structure of the source into the output destination, which results in empty folders inside of the destination. This resolves the issue by telling gulp-sass to watch only the *.scss

akiya64 commented 5 years ago

Hi! It is good simple way for .scss.

I think it is better compile both .sass and .scss files. How about using gulp-ignore, setting isFile switch. Gulp ignore folders, so does not create empty folders.

gulp_tasks/sass.js

const sass         = require('gulp-sass');
const ignore       = require('gulp-ignore');

gulp.task('sass', function () {
  return gulp.src(config.assets + '/' + config.sass.src + '/**/*')
    .pipe(ignore.include({isFile: true}))
    .pipe(sass({outputStyle: config.sass.outputStyle}).on('error', sass.logError))
    .pipe(postcss([
ixkaito commented 5 years ago

Thanks @ginfuru @akiya64 . I'll close this PR because I agree with @akiya64 . We should compile both .scss and .sass or maybe .css. I think empty folders won't cause critical problems and Git ignores them.