{"size": 1168, "ext": "js", "max_stars_repo_path": "Gulpfile.js", "max_stars_repo_name": "and3rson/enlightenment", "max_stars_repo_stars_event_min_datetime": "2017-02-14T14:55:35.000Z", "max_stars_repo_stars_event_max_datetime": "2018-01-05T09:14:25.000Z", "max_issues_repo_path": "Gulpfile.js", "max_issues_repo_name": "and3rson/enlightenment", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "Gulpfile.js", "max_forks_repo_name": "and3rson/enlightenment", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 7, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 24.3333333333, "max_line_length": 74, "alphanum_fraction": 0.5428082192}
var gulp = require('gulp'),
    watch = require('gulp-watch'),
    browserify = require('browserify'),
    babelify = require('babelify'),
    source = require('vinyl-source-stream'),
    stringify = require('stringify'),
    uglify = require('gulp-uglify'),
    rename = require('gulp-rename');

gulp.task('browserify', () => {
    return browserify({
        'entries': ['src/main.js'],
        debug: true
    })
    .transform(babelify, {
        presets: ['es2015'],
        sourceMaps: false
    })
    .transform(stringify, {
        appliesTo: {
            includeExtensions: ['.frag']
        },
        minify: false
    })
    .bundle()
    .pipe(source('enlightenment.js')) // gives streaming vinyl file object
    .pipe(gulp.dest('./dist'));
});

gulp.task('uglify', ['browserify'], () => {
    return gulp
    .src('dist/enlightenment.js')
    .pipe(uglify({
        fileName: 'enlightenment.min.js'
    }))
    .pipe(rename({
        extname: '.min.js'
    }))
    .pipe(gulp.dest('./dist'))
    ;
});

gulp.task('build', ['browserify', 'uglify']);

gulp.task('watch', () => {
    gulp.watch(['./index.html', './src/*', './example/*'], ['build']);
});
