<commit_before>'use strict';

var gulp = require('gulp'),
    nodemon = require('gulp-nodemon'),
    jshint = require('gulp-jshint'),
    stylish = require('jshint-stylish');


var paths = {
    server_scripts: ['server.js', 'app/**/*.js', '!node_modules/**'],
    frontend_scripts: ['frontend/js/**/*.js'],
    frontend_static: ['frontend/**/*.html', 'frontend/img/**'],
    css: ['frontend/css/*.css'],
    dest_static: 'public'
};

// Lint serveur
gulp.task('lint_server', function() {
    gulp.src(paths.server_scripts)
        .pipe(jshint())
        .pipe(jshint.reporter(stylish));
});

// Lint frontend
gulp.task('lint_frontend', function() {
    gulp.src(paths.server_scripts)
        .pipe(jshint())
        .pipe(jshint.reporter(stylish));
});


// Frontend
gulp.task('frontend', function() {
    gulp.src(paths.frontend_static)
        .pipe(gulp.dest(paths.dest_static));
});

gulp.task('nodemon', function() {
    nodemon({ script: 'server.js', ext: 'js', ignore: ['gulpfile.js'] })
        .on('change', ['lint_server']);
});

// Default Task
gulp.task('default', ['lint_frontend', 'lint_server', 'frontend', 'nodemon']);<commit_msg>ajout de la tache watch sur les fichiers frontend<commit_after>'use strict';

var gulp = require('gulp'),
    nodemon = require('gulp-nodemon'),
    jshint = require('gulp-jshint'),
    stylish = require('jshint-stylish');


var paths = {
    server_scripts: ['server.js', 'app/**/*.js', '!node_modules/**'],
    frontend_scripts: ['frontend/js/**/*.js'],
    frontend_static: ['frontend/**/*.html', 'frontend/img/**'],
    css: ['frontend/css/*.css'],
    dest_static: 'public'
};

/**** Tâches Serveur ****/
/************************/

// Lint serveur
gulp.task('lint_server', function() {
    gulp.src(paths.server_scripts)
        .pipe(jshint())
        .pipe(jshint.reporter(stylish));
});

gulp.task('nodemon', function() {
    nodemon({ script: 'server.js', ext: 'js', ignore: ['gulpfile.js'] })
        .on('change', ['lint_server']);
});


/**** Tâches Frontend ****/
/*************************/

// Lint frontend
gulp.task('lint_frontend', function() {
    gulp.src(paths.server_scripts)
        .pipe(jshint())
        .pipe(jshint.reporter(stylish));
});


// Frontend
gulp.task('frontend', function() {
    gulp.src(paths.frontend_static)
        .pipe(gulp.dest(paths.dest_static));
});

// Excécution en cas de changement
gulp.task('watch', function() {
    gulp.watch(paths.frontend_static, ['frontend']);
});

// Default Task
gulp.task('default', ['lint_frontend', 'lint_server', 'frontend', 'watch', 'nodemon']);
{'fraction_non_alphanumeric': 0.23303606048856146, 'fraction_numerical': 0.0, 'mean_word_length': 3.877126654064272, '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': '7094266', 'n_tokens_mistral': 924, 'n_tokens_neox': 921, 'n_words': 147}