<commit_before>/*
 * grunt-phonegap-project
 * https://github.com/CoHyper/grunt-phonegap-project
 *
 * Copyright (c) 2014 svenlang
 * Licensed under the MIT license.
 */

'use strict';

module.exports = function(grunt) {

    function getPlatforms() {
        // Travis cant install with javascript iOS and/or Android SDK
        // so local can test without any changed
        var platforms = [
            'ios',
            'android'
        ];
        // TODO : perhaps other solution
        return grunt.file.isFile("../grunt_debug.js") ? platforms : [];
    }

    // Project configuration.
    grunt.initConfig({
        jshint: {
            all: [
                'Gruntfile.js',
                'tasks/*.js',
                '<%= nodeunit.tests %>'
            ],
            options: {
                "curly": true,
                "eqeqeq": true,
                "immed": true,
                "latedef": true,
                "newcap": true,
                "noarg": true,
                "sub": true,
                "undef": true,
                "boss": true,
                "eqnull": true,
                "node": true
            }
        },

        // Before generating any new files, remove any previously-created files.
        clean: {
            tests: ['tmp', 'myyapp']
        },

        // Configuration to be run (and then tested).
        phonegap_project: {
            options: {
                path: 'myyapp',
                androidMinSdk: 10,
                androidTargetSdk: 19
            },
            create: {
                title: 'MyyApp',
                bundleId: 'de.myylinks.myyapp',
                platforms: getPlatforms(),
                plugins: [
                    // add all cordova plugins, for testing with travis
                    "org.apache.cordova.battery-status",
                    "org.apache.cordova.camera",
                    "org.apache.cordova.console",
                    "org.apache.cordova.contacts",
                    "org.apache.cordova.device",
                    "org.apache.cordova.device-motion",
                    "org.apache.cordova.device-orientation",
                    "org.apache.cordova.dialogs",
                    "org.apache.cordova.file",
                    "org.apache.cordova.file-transfer",
                    "org.apache.cordova.geolocation",
                    "org.apache.cordova.globalization",
                    "org.apache.cordova.inappbrowser",
                    "org.apache.cordova.media",
                    "org.apache.cordova.media-capture",
                    "org.apache.cordova.network-information",
                    "org.apache.cordova.splashscreen",
                    "org.apache.cordova.vibration"
                ]
            },
            build: {
                platforms: getPlatforms()
            }
        },

        // Unit tests.
        nodeunit: {
            tests: ['test/*_test.js']
        }

    });

    // Actually load this plugin's task(s).
    grunt.loadTasks('tasks');

    // These plugins provide necessary tasks.
    grunt.loadNpmTasks('grunt-contrib-jshint');
    grunt.loadNpmTasks('grunt-contrib-clean');
    grunt.loadNpmTasks('grunt-contrib-nodeunit');

    // Whenever the "test" task is run, first clean the "tmp" dir, then run this
    // plugin's task(s), then test the result.
    grunt.registerTask('test', ['clean', 'phonegap_project', 'nodeunit']);

    // By default, lint and run all tests.
    grunt.registerTask('default', ['jshint', 'test']);

    // All "phonegap_project" tasks
    grunt.registerTask('project', ['phonegap_project']);
    grunt.registerTask('create', ['phonegap_project:create']);
    grunt.registerTask('build', ['phonegap_project:build']);

};<commit_msg>grunt // update task<commit_after>/*
 * grunt-phonegap-project
 * https://github.com/CoHyper/grunt-phonegap-project
 *
 * Copyright (c) 2014 svenlang
 * Licensed under the MIT license.
 */

'use strict';


module.exports = function(grunt) {

    function getPlatforms() {
        // Travis cant install with javascript iOS and/or Android SDK
        // so local can test without any changed
        var platforms = [
            'ios',
            'android'
        ];
        // TODO : perhaps other solution
        return grunt.file.isFile("../grunt_debug.js") ? platforms : [];
    }

    // Project configuration.
    grunt.initConfig({
        jshint: {
            all: [
                'Gruntfile.js',
                'tasks/*.js',
                '<%= nodeunit.tests %>'
            ],
            options: {
                "curly": true,
                "eqeqeq": true,
                "immed": true,
                "latedef": true,
                "newcap": true,
                "noarg": true,
                "sub": true,
                "undef": true,
                "boss": true,
                "eqnull": true,
                "node": true
            }
        },

        // Before generating any new files, remove any previously-created files.
        clean: {
            tests: ['tmp', 'myyapp']
        },

        // Configuration to be run (and then tested).
        phonegap_project: {
            options: {
                path: 'myyapp',
                androidMinSdk: 10,
                androidTargetSdk: 19
            },
            create: {
                title: 'MyyApp',
                bundleId: 'de.myylinks.myyapp',
                platforms: getPlatforms(),
                plugins: [
                    // add all cordova plugins, for testing with travis
                    "org.apache.cordova.battery-status",
                    "org.apache.cordova.camera",
                    "org.apache.cordova.console",
                    "org.apache.cordova.contacts",
                    "org.apache.cordova.device",
                    "org.apache.cordova.device-motion",
                    "org.apache.cordova.device-orientation",
                    "org.apache.cordova.dialogs",
                    "org.apache.cordova.file",
                    "org.apache.cordova.file-transfer",
                    "org.apache.cordova.geolocation",
                    "org.apache.cordova.globalization",
                    "org.apache.cordova.inappbrowser",
                    "org.apache.cordova.media",
                    "org.apache.cordova.media-capture",
                    "org.apache.cordova.network-information",
                    "org.apache.cordova.splashscreen",
                    "org.apache.cordova.vibration"
                ]
            },
            build: {
                platforms: getPlatforms()
            }
        },

        // Unit tests.
        nodeunit: {
            tests: ['test/*_test.js']
        }

    });

    // Actually load this plugin's task(s).
    grunt.loadTasks('tasks');

    // These plugins provide necessary tasks.
    grunt.loadNpmTasks('grunt-contrib-jshint');
    grunt.loadNpmTasks('grunt-contrib-clean');
    grunt.loadNpmTasks('grunt-contrib-nodeunit');

    // Whenever the "test" task is run, first clean the "tmp" dir, then run this
    // plugin's task(s), then test the result.
    grunt.registerTask('test', ['clean', 'phonegap_project:create', 'nodeunit']);

    // By default, lint and run all tests.
    grunt.registerTask('default', ['jshint', 'test']);

    // All "phonegap_project" tasks
    grunt.registerTask('create', ['phonegap_project:create']);
    grunt.registerTask('build', ['phonegap_project:build']);

};
{'fraction_non_alphanumeric': 0.12536676447052547, 'fraction_numerical': 0.002133902373966391, 'mean_word_length': 1.419032258064516, 'pattern_counts': {'":': 22, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '3652376', 'n_tokens_mistral': 2143, 'n_tokens_neox': 1988, 'n_words': 406}