<commit_before>'use strict'

const paths = require('../../config/paths.json')

const gulp = require('gulp')
const runSequence = require('run-sequence')
const rename = require('gulp-rename')
const flatten = require('gulp-flatten')

const sass = require('gulp-sass')
const nano = require('gulp-cssnano')

// Compile Sass to CSS
gulp.task('build:styles', cb => {
  runSequence('lint:styles', 'build:styles:copy', 'build:styles:compile', cb)
})

gulp.task('build:styles:copy', cb => {
  runSequence('build:styles:copy:scss', 'build:styles:copy:components', cb)
})

gulp.task('build:styles:copy:scss', () => {
  return gulp.src(paths.assetsScss + '**/*.scss')
    .pipe(gulp.dest(paths.bundleScss))
})

gulp.task('build:styles:copy:components', () => {
  return gulp.src(paths.srcComponents + '**/*.scss')
    .pipe(flatten())
    .pipe(gulp.dest(paths.bundleScss + 'components'))
})

gulp.task('build:styles:compile', () => {
  return gulp.src(paths.bundleScss + '**/*.scss')
    .pipe(sass.sync().on('error', sass.logError))
    .pipe(gulp.dest(paths.bundleCss))
    .pipe(gulp.dest(paths.publicCss))
    .pipe(rename({ suffix: '.min' }))
    .pipe(nano())
    .pipe(gulp.dest(paths.bundleCss))
})<commit_msg>Add a new task to copy scopes before building<commit_after>'use strict'

const paths = require('../../config/paths.json')

const gulp = require('gulp')
const runSequence = require('run-sequence')
const rename = require('gulp-rename')
const flatten = require('gulp-flatten')

const sass = require('gulp-sass')
const nano = require('gulp-cssnano')

// Compile Sass to CSS
gulp.task('build:styles', cb => {
  runSequence('lint:styles', 'build:styles:copy', 'build:styles:compile', cb)
})

gulp.task('build:styles:copy', cb => {
  runSequence('build:styles:copy:scss', 'build:styles:copy:components', 'build:styles:copy:scopes', cb)
})

gulp.task('build:styles:copy:scss', () => {
  return gulp.src(paths.assetsScss + '**/*.scss')
    .pipe(gulp.dest(paths.bundleScss))
})

gulp.task('build:styles:copy:components', () => {
  return gulp.src(paths.srcComponents + '**/*.scss')
    .pipe(flatten())
    .pipe(gulp.dest(paths.bundleScss + 'components'))
})

gulp.task('build:styles:copy:scopes', () => {
  return gulp.src(paths.srcScopes + '**/**/*.scss')
    .pipe(flatten())
    .pipe(gulp.dest(paths.bundleScss + 'scopes'))
})

gulp.task('build:styles:compile', () => {
  return gulp.src(paths.bundleScss + '**/*.scss')
    .pipe(sass.sync().on('error', sass.logError))
    .pipe(gulp.dest(paths.bundleCss))
    .pipe(gulp.dest(paths.publicCss))
    .pipe(rename({ suffix: '.min' }))
    .pipe(nano())
    .pipe(gulp.dest(paths.bundleCss))
})
{'fraction_non_alphanumeric': 0.2158790170132325, 'fraction_numerical': 0.0, 'mean_word_length': 4.90625, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4118826', 'n_tokens_mistral': 983, 'n_tokens_neox': 982, 'n_words': 142}