<commit_before>'use strict';

import gulp from 'gulp';
import babel from 'gulp-babel';
import rename from 'gulp-rename';

const LOCAL_ENV_PATH = process.env.HEXO_TAG_APLAYER_LOCAL_PATH;

gulp.task('default', ['build']);

gulp.task('build', () => {
    return gulp.src('./index.es')
        .pipe(babel({
            'presets': ['es2015']
        })) 
        .pipe(rename('index.js'))
        .pipe(gulp.dest('.'));
});

gulp.task('test', () => {
    return gulp.src('./index.es')
        .pipe(babel({
            'presets': ['es2015']
        }))
        .pipe(rename('index.js'))
        .pipe(gulp.dest(LOCAL_ENV_PATH));
});<commit_msg>chore: support compile serveral files with Babel<commit_after>'use strict';

import gulp from 'gulp';
import babel from 'gulp-babel';
import rename from 'gulp-rename';

const LOCAL_ENV_PATH = process.env.HEXO_TAG_APLAYER_LOCAL_PATH;
const sources = ['./index.es', './lib/*.es'];
const resetExt = path => { path.ext = '.js' };

gulp.task('default', ['build']);

gulp.task('build', () => {
    return gulp.src(sources)
        .pipe(babel({
            'presets': ['es2015']
        })) 
        .pipe(rename(resetExt))
        .pipe(gulp.dest('.'));
});

gulp.task('test', () => {
    return gulp.src(sources)
        .pipe(babel({
            'presets': ['es2015']
        }))
        .pipe(rename(resetExt))
        .pipe(gulp.dest(LOCAL_ENV_PATH));
});
{'fraction_non_alphanumeric': 0.203012912482066, 'fraction_numerical': 0.011477761836441894, 'mean_word_length': 2.7804878048780486, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, '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': '6154344', 'n_tokens_mistral': 511, 'n_tokens_neox': 491, 'n_words': 85}