<commit_before>/*global module */

module.exports = function (grunt) {

    var pkg = grunt.file.readJSON('package.json');
    var banner = '/* ' + pkg.name + ' ' + pkg.version + ' (c) ' + pkg.author + ' */\n';

    grunt.initConfig({

        pkg: pkg,

        clean: {
            api: [
                     'docs/api/*'
                 ],
            olexp: [
                       'dist/*.js',
                       'dist/*.css'
                   ]
        },

        concat: {
            css: {
                dest: 'dist/olexp.css',
                options: {
                    banner: banner
                },
                src: [
                         'src/css/explorer.css',
                         'src/css/control.css',
                         'src/css/item.css',
                         'src/css/measure.css',
                         'src/css/menu.css',
                         'src/css/ol.css',
                         'src/css/olexp.ol3.css',
                         'src/css/olexp.w2ui.css'
                     ]
            },
            js: {
                dest: 'dist/olexp.js',
                options: {
                    banner: banner
                },
                src: [
                         'src/js/explorer.js',
                         'src/js/event.js',
                         'src/js/control.js',
                         'src/js/item.js',
                         'src/js/manager.js',
                         'src/js/measure.js',
                         'src/js/menu.js',
                         'src/js/ol.js',
                         'src/js/selection.js',
                         'src/js/util.js'
                     ]
            },
            'css-sa': {
                dest: 'dist/olexp.sa.min.css',
                options: {
                    banner: banner
                },
                src: [
                         'libs/ol3/ol.css',
                         'libs/w2ui/w2ui.min.css',
                         'dist/olexp.min.css'
                     ]
            },
            'js-sa': {
                dest: 'dist/olexp.sa.min.js',
                src: [
                         'libs/jquery/jquery.min.js',
                         'libs/ol3/ol.js',
                         'libs/w2ui/w2ui.min.js',
                         'dist/olexp.min.js'
                     ]
            }
        },

        copy: {
            main: {
                files: [
                    {
                        dest: 'docs/api/docs/web/img/',
                        expand: true,
                        filter: 'isFile',
                        flatten: true,
                        src: ['docs/web/img/*']
                    }
                ]
            }
        },

        csslint: {
            olexp: {
                options: {
                    "overqualified-elements": false
                },
                src: [
                    'src/css/*.css',
                    'src/css/!*.min.css'
                ]
            }
        },

        cssmin: {
            dist: {
                cwd: 'dist/',
                dest: 'dist/',
                expand: true,
                ext: '.min.css',
                src: [
                    '*.css',
                    '!*.min.css'
                ]
            }
        },

        'gh-pages': {
            src: ['dist/**',
                  'docs/**',
                  'libs/**',
                  'index.html']
        },

        gitadd: {
            dist: {
                files: {
                    src: ['dist/*']
                }
            }
        },
  
        gitcommit: {
            dist: {
                options: {
                    message: 'Add new dist files for release ' + pkg.version
                },
                files: {
                    src: ['dist/*']
                }
            }
        },

        jsdoc : {
            dist : {
                options: {
                    configure: "conf.json",
                    destination: "docs/api",
                    template: "node_modules/ink-docstrap/template"
                }
            }
        },

        jshint: {
            dist: {
                src: [
                    'src/js/*.js',
                    '!src/js/*.min.js'
                ]
            }
        },

        release: {
            options: {
                npm: false,
                afterBump: ['default', 'dist'],
                github: {
                    repo: 'dpmcmlxxvi/olexp',
                    accessTokenVar: 'GITHUB_ACCESS_TOKEN'
                },
            }
        },

        uglify: {
            olexp: {
                files: {
                    'dist/olexp.min.js': 'dist/olexp.js'
                },
                options: {
                    banner: banner
                }<commit_msg>Publish to npm on release<commit_after>/*global module */

module.exports = function (grunt) {

    var pkg = grunt.file.readJSON('package.json');
    var banner = '/* ' + pkg.name + ' ' + pkg.version + ' (c) ' + pkg.author + ' */\n';

    grunt.initConfig({

        pkg: pkg,

        clean: {
            api: [
                     'docs/api/*'
                 ],
            olexp: [
                       'dist/*.js',
                       'dist/*.css'
                   ]
        },

        concat: {
            css: {
                dest: 'dist/olexp.css',
                options: {
                    banner: banner
                },
                src: [
                         'src/css/explorer.css',
                         'src/css/control.css',
                         'src/css/item.css',
                         'src/css/measure.css',
                         'src/css/menu.css',
                         'src/css/ol.css',
                         'src/css/olexp.ol3.css',
                         'src/css/olexp.w2ui.css'
                     ]
            },
            js: {
                dest: 'dist/olexp.js',
                options: {
                    banner: banner
                },
                src: [
                         'src/js/explorer.js',
                         'src/js/event.js',
                         'src/js/control.js',
                         'src/js/item.js',
                         'src/js/manager.js',
                         'src/js/measure.js',
                         'src/js/menu.js',
                         'src/js/ol.js',
                         'src/js/selection.js',
                         'src/js/util.js'
                     ]
            },
            'css-sa': {
                dest: 'dist/olexp.sa.min.css',
                options: {
                    banner: banner
                },
                src: [
                         'libs/ol3/ol.css',
                         'libs/w2ui/w2ui.min.css',
                         'dist/olexp.min.css'
                     ]
            },
            'js-sa': {
                dest: 'dist/olexp.sa.min.js',
                src: [
                         'libs/jquery/jquery.min.js',
                         'libs/ol3/ol.js',
                         'libs/w2ui/w2ui.min.js',
                         'dist/olexp.min.js'
                     ]
            }
        },

        copy: {
            main: {
                files: [
                    {
                        dest: 'docs/api/docs/web/img/',
                        expand: true,
                        filter: 'isFile',
                        flatten: true,
                        src: ['docs/web/img/*']
                    }
                ]
            }
        },

        csslint: {
            olexp: {
                options: {
                    "overqualified-elements": false
                },
                src: [
                    'src/css/*.css',
                    'src/css/!*.min.css'
                ]
            }
        },

        cssmin: {
            dist: {
                cwd: 'dist/',
                dest: 'dist/',
                expand: true,
                ext: '.min.css',
                src: [
                    '*.css',
                    '!*.min.css'
                ]
            }
        },

        'gh-pages': {
            src: ['dist/**',
                  'docs/**',
                  'libs/**',
                  'index.html']
        },

        gitadd: {
            dist: {
                files: {
                    src: ['dist/*']
                }
            }
        },
  
        gitcommit: {
            dist: {
                options: {
                    message: 'Add new dist files for release ' + pkg.version
                },
                files: {
                    src: ['dist/*']
                }
            }
        },

        jsdoc : {
            dist : {
                options: {
                    configure: "conf.json",
                    destination: "docs/api",
                    template: "node_modules/ink-docstrap/template"
                }
            }
        },

        jshint: {
            dist: {
                src: [
                    'src/js/*.js',
                    '!src/js/*.min.js'
                ]
            }
        },

        release: {
            options: {
                afterBump: ['default', 'dist'],
                github: {
                    repo: 'dpmcmlxxvi/olexp',
                    accessTokenVar: 'GITHUB_ACCESS_TOKEN'
                },
            }
        },

        uglify: {
            olexp: {
                files: {
                    'dist/olexp.min.js': 'dist/olexp.js'
                },
                options: {
                    banner: banner
                }
{'fraction_non_alphanumeric': 0.12228149363972096, 'fraction_numerical': 0.0016413623307345096, 'mean_word_length': 0.5600896143382941, 'pattern_counts': {'":': 2, '<': 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': '5149999', 'n_tokens_mistral': 2695, 'n_tokens_neox': 2402, 'n_words': 338}