{"size": 2073, "ext": "js", "max_stars_repo_path": "popup-modal/Gruntfile.js", "max_stars_repo_name": "dalamilla/frontend-projects", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "popup-modal/Gruntfile.js", "max_issues_repo_name": "dalamilla/frontend-projects", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "popup-modal/Gruntfile.js", "max_forks_repo_name": "dalamilla/frontend-projects", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 26.2405063291, "max_line_length": 91, "alphanum_fraction": 0.3699951761}
const sass = require('sass');

module.exports = function (grunt) {
    // Configuration
    grunt.initConfig({
        watch: {
            js: {
                files: 'src/*.js',
                tasks: ['uglify']
            },
            sass: {
                files: 'src/*.scss',
                tasks: ['sass']
            },
            assets: {
                files: ['src/*.html', 'src/img/**'],
                tasks: ['copy']
            }
        },
        browserSync: {
            bsFiles: {
                src: ['dist/*.html', 'dist/*.js', 'dist/*.css']
            },
            options: {
                watchTask: true,
                server: {
                    baseDir: "dist"
                }
            }
        },
        uglify: {
            build: {
                files: [{
                    src: 'src/main.js',
                    dest: 'dist/main.js'
                }]
            }
        },
        sass: {
            options: {
                implementation: sass,
                outputStyle: 'compressed'
            },
            dist: {
                files: {
                    'dist/style.css': 'src/style.scss'
                }
            }
        },
        copy: {
            html: {
                expand: true,
                cwd: 'src',
                src: 'index.html',
                dest: 'dist/',
            },
            img: {
                expand: true,
                cwd: 'src',
                src: 'img/**',
                dest: 'dist/',
            },
        },
        clean: ['dist']
    });

    // Load Plugins
    grunt.loadNpmTasks('grunt-contrib-uglify');
    grunt.loadNpmTasks('grunt-contrib-clean');
    grunt.loadNpmTasks('grunt-contrib-copy');
    grunt.loadNpmTasks('grunt-contrib-watch');
    grunt.loadNpmTasks('grunt-browser-sync');
    grunt.loadNpmTasks('grunt-sass');

    // Register tasks
    grunt.registerTask('dev', ['clean', 'copy', 'sass', 'uglify', 'browserSync', 'watch']);
    grunt.registerTask('default', ['clean', 'copy', 'sass', 'uglify']);
}
