<commit_before>'use strict';

const gulp = require('gulp');
const del = require('del');
const sass = require('gulp-sass');
const autoprefixer = require('gulp-autoprefixer');
const cleanCSS = require('gulp-clean-css');
const runSequence = require('run-sequence');
const inlineNg2Template = require('gulp-inline-ng2-template');
const rename = require("gulp-rename");



const paths = {
  all: "./npm-modules/**/*.*",
  temp: "./temp",
  sass: "./temp/**/*.scss",
  ts: "./temp/**/*.ts"
};

gulp.task('build-clean', function () {
  return del(paths.temp);
});

gulp.task('sass', function () {
  return gulp.src(paths.sass)
    .pipe(sass().on('error', sass.logError))
    .pipe(autoprefixer({
      browsers: ['last 2 versions'],
      cascade: false
    }))
    .pipe(cleanCSS())
    .pipe(gulp.dest(sameFolder));
});

gulp.task('inline', () => {
  return gulp.src(paths.ts)
    .pipe(inlineNg2Template({ useRelativePaths:true}))
    .pipe(gulp.dest(sameFolder));
});


gulp.task('copy-npm-modules', () => {
  return gulp.src(paths.all)
    .pipe(gulp.dest(paths.temp));
});

gulp.task('build', () => {
  runSequence(
    'build-clean',
    'copy-npm-modules',
    'sass',
    'inline'
  );
});


function sameFolder(file) {
  return file.base;
}<commit_msg>add gulp tasks<commit_after>'use strict';

const gulp = require('gulp');
const del = require('del');
const sass = require('gulp-sass');
const autoprefixer = require('gulp-autoprefixer');
const cleanCSS = require('gulp-clean-css');
const runSequence = require('run-sequence');
const inlineNg2Template = require('gulp-inline-ng2-template');
const rename = require("gulp-rename");



const paths = {
  all: "./npm-modules/**/*.*",
  temp: "./temp",
  sass: "./temp/**/*.scss",
  css: "./temp/**/*.css",
  ts: "./temp/**/*.ts"
};

gulp.task('build-clean', function () {
  return del(paths.temp);
});

gulp.task('build-rename', function () {
  return gulp.src(paths.css)
    .pipe(rename(function (path) {
      path.extname = ".scss"
    }))
    .pipe(gulp.dest(sameFolder));
});

gulp.task('build-sass', function () {
  return gulp.src(paths.sass)
    .pipe(sass().on('error', sass.logError))
    .pipe(autoprefixer({
      browsers: ['last 2 versions'],
      cascade: false
    }))
    .pipe(cleanCSS())
    .pipe(gulp.dest(sameFolder));
});

gulp.task('build-inline', () => {
  return gulp.src(paths.ts)
    .pipe(inlineNg2Template({ useRelativePaths:true}))
    .pipe(gulp.dest(sameFolder));
});


gulp.task('build-copy-npm-modules', () => {
  return gulp.src(paths.all)
    .pipe(gulp.dest(paths.temp));
});

gulp.task('build', () => {
  runSequence(
    'build-clean',
    'build-copy-npm-modules',
    'build-sass',
    'build-rename',
    'build-inline'
  );
});


function sameFolder(file) {
  return file.base;
}
{'fraction_non_alphanumeric': 0.21873873873873872, 'fraction_numerical': 0.002882882882882883, 'mean_word_length': 3.7130730050933787, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '3979343', 'n_tokens_mistral': 1034, 'n_tokens_neox': 1021, 'n_words': 164}