<commit_before>const path      = require('path');
const gulp      = require('gulp');
// const uglify    = require('gulp-uglify');
// const minifyCss = require('gulp-minify-css');
const concat    = require('gulp-concat');
const less      = require('gulp-less');
const sourcemaps = require('gulp-sourcemaps');

const BUILD_PATH = './build';
const SRC_PATH   = "./src";

function frontend_editor_class_css() {
    return gulp.src(path.join(SRC_PATH, 'frontend/editor/class/**/*.less'))
        .pipe(sourcemaps.init())
        .pipe(less())
        .pipe(concat('editor.css'))
        // .pipe(minifyCss())
        .pipe(sourcemaps.write('.'))
        .pipe(gulp.dest(path.join(BUILD_PATH, 'lib/frontend/css')));
}

function frontend_editor_class_html() {
    return gulp.src(path.join(SRC_PATH, 'frontend/editor/class/**/*.html'))
        .pipe(gulp.dest(path.join(BUILD_PATH, 'lib/frontend/editor/class')));
}

function frontend_editor_class_ejs() {
    return gulp.src(path.join(SRC_PATH, 'frontend/editor/class/**/*.ejs'))
        .pipe(gulp.dest(path.join(BUILD_PATH, 'lib/frontend/editor/class')));
}

function frontend_editor_class_js() {
    return gulp.src(path.join(SRC_PATH, 'frontend/editor/class/**/*.js'))
        .pipe(sourcemaps.init())
        .pipe(concat('editor.js'))
        //.pipe(uglify())
        .pipe(sourcemaps.write('.'))
        .pipe(gulp.dest(path.join(BUILD_PATH, 'lib/frontend/js')));
}

function frontend_editor_lib() {
    return gulp.src(path.join(SRC_PATH, 'frontend/editor/lib/**/*'))
        .pipe(gulp.dest(path.join(BUILD_PATH, 'lib/frontend/lib')));
}

function frontend_editor_img() {
    return gulp.src(path.join(SRC_PATH, 'frontend/editor/img/**/*'))
        .pipe(gulp.dest(path.join(BUILD_PATH, 'lib/frontend/img')));
}

const frontend_editor_class = gulp.series(frontend_editor_class_js, frontend_editor_class_css, frontend_editor_class_html, frontend_editor_class_ejs);
const frontend_editor = gulp.series(frontend_editor_class, frontend_editor_lib, frontend_editor_img);

module.exports = frontend_editor;<commit_msg>compile js for editor<commit_after>const path      = require('path');
const gulp      = require('gulp');
// const uglify    = require('gulp-uglify');
// const minifyCss = require('gulp-minify-css');
const concat    = require('gulp-concat');
const less      = require('gulp-less');
const sourcemaps = require('gulp-sourcemaps');
const babel      = require('gulp-babel');

const BUILD_PATH = './build';
const SRC_PATH   = "./src";

function frontend_editor_class_css() {
    return gulp.src(path.join(SRC_PATH, 'frontend/editor/class/**/*.less'))
        .pipe(sourcemaps.init())
        .pipe(less())
        .pipe(concat('editor.css'))
        // .pipe(minifyCss())
        .pipe(sourcemaps.write('.'))
        .pipe(gulp.dest(path.join(BUILD_PATH, 'lib/frontend/css')));
}

function frontend_editor_class_html() {
    return gulp.src(path.join(SRC_PATH, 'frontend/editor/class/**/*.html'))
        .pipe(gulp.dest(path.join(BUILD_PATH, 'lib/frontend/editor/class')));
}

function frontend_editor_class_ejs() {
    return gulp.src(path.join(SRC_PATH, 'frontend/editor/class/**/*.ejs'))
        .pipe(gulp.dest(path.join(BUILD_PATH, 'lib/frontend/editor/class')));
}

function frontend_editor_class_js() {
    return gulp.src(path.join(SRC_PATH, 'frontend/editor/class/**/*.js'))
        .pipe(sourcemaps.init())
        .pipe(concat('editor.js'))
        //.pipe(uglify())
        .pipe(sourcemaps.write('.'))
        .pipe(gulp.dest(path.join(BUILD_PATH, 'lib/frontend/js')));
}

function frontend_editor_jsx_js() {
    return gulp.src(path.join(SRC_PATH, 'frontend/editor/class/**/*.jsx'))
        .pipe(sourcemaps.init())
        .pipe(babel())
        .pipe(concat('editor-jsx.js'))
        .pipe(sourcemaps.write('.'))
        .pipe(gulp.dest(path.join(BUILD_PATH, 'lib/frontend/js')));
}

function frontend_editor_jsx_less() {
    return gulp.src(path.join(SRC_PATH, 'frontend/editor/class/**/*.less'))
        .pipe(sourcemaps.init())
        .pipe(less())
        .pipe(concat('editor-jsx.css'))
        .pipe(sourcemaps.write('.'))
        .pipe(gulp.dest(path.join(BUILD_PATH, 'lib/frontend/css')));
}


function frontend_editor_lib() {
    return gulp.src(path.join(SRC_PATH, 'frontend/editor/lib/**/*'))
        .pipe(gulp.dest(path.join(BUILD_PATH, 'lib/frontend/lib')));
}

function frontend_editor_img() {
    return gulp.src(path.join(SRC_PATH, 'frontend/editor/img/**/*'))
        .pipe(gulp.dest(path.join(BUILD_PATH, 'lib/frontend/img')));
}

const frontend_editor_class = gulp.series(
    frontend_editor_class_js,
    frontend_editor_class_css,
    frontend_editor_class_html,
    frontend_editor_class_ejs,
    frontend_editor_jsx_js,
    frontend_editor_jsx_less,
);
const frontend_editor = gulp.series(frontend_editor_class, frontend_editor_lib, frontend_editor_img);

module.exports = frontend_editor;
{'fraction_non_alphanumeric': 0.17825020441537204, 'fraction_numerical': 0.0, 'mean_word_length': 3.858987090367428, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5594775', 'n_tokens_mistral': 1743, 'n_tokens_neox': 1738, 'n_words': 212}