<commit_before>module.exports = function(grunt) {

  // Project configuration.
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    nodewebkit: {
      options: {
        build_dir: './build', // Destination for built apps.
        mac: true,            // OS X support.
        win: true,            // Windows support.
        linux32: false,       // Linux 32-bit support.
        linux64: false        // Linux 64-bit support.
      },
      src: ['./www/**/*', './node_modules/phonegap/**/*']
    }
  });

  // Load the grunt plugins.
  grunt.loadNpmTasks('grunt-node-webkit-builder');

  // Register the task to install nodewebkit dependencies.
  grunt.task.registerTask('install-dependencies', function() {
    var exec = require('child_process').exec,
        callback = this.async();

    exec('npm install', { cwd: './www' }, function(e, stdout, stderr) {
      console.log(stdout);
      callback();
    });
  });

  // Register the task to open an app.
  grunt.task.registerTask('open', 'Open the app', function() {
    var os = require('os'),
        opener = require('opener'),
        appName = grunt.config('pkg.name'),
        macPath = 'build/releases/appName/mac/appName.app',
        winPath = 'build/releases/appName/win/appName/appName.exe';

    macPath = macPath.replace(/appName/g, appName);
    winPath = winPath.replace(/appName/g, appName);

    opener((os.platform() === 'darwin') ? macPath : winPath);
  });

  // Default tasks.
  grunt.registerTask('default', ['install-dependencies', 'nodewebkit']);

};
<commit_msg>[grunt] Only install production dependencies.<commit_after>module.exports = function(grunt) {

  // Project configuration.
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    nodewebkit: {
      options: {
        build_dir: './build', // Destination for built apps.
        mac: true,            // OS X support.
        win: true,            // Windows support.
        linux32: false,       // Linux 32-bit support.
        linux64: false        // Linux 64-bit support.
      },
      src: ['./www/**/*', './node_modules/phonegap/**/*']
    }
  });

  // Load the grunt plugins.
  grunt.loadNpmTasks('grunt-node-webkit-builder');

  // Register the task to install nodewebkit dependencies.
  grunt.task.registerTask('install-dependencies', function() {
    var exec = require('child_process').exec,
        callback = this.async();

    exec('npm install --production', { cwd: './www' }, function(e, stdout, stderr) {
      console.log(stdout);
      callback();
    });
  });

  // Register the task to open an app.
  grunt.task.registerTask('open', 'Open the app', function() {
    var os = require('os'),
        opener = require('opener'),
        appName = grunt.config('pkg.name'),
        macPath = 'build/releases/appName/mac/appName.app',
        winPath = 'build/releases/appName/win/appName/appName.exe';

    macPath = macPath.replace(/appName/g, appName);
    winPath = winPath.replace(/appName/g, appName);

    opener((os.platform() === 'darwin') ? macPath : winPath);
  });

  // Default tasks.
  grunt.registerTask('default', ['install-dependencies', 'nodewebkit']);

};

{'fraction_non_alphanumeric': 0.16587976078061065, 'fraction_numerical': 0.005036197670758577, 'mean_word_length': 2.5350389321468296, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '4571306', 'n_tokens_mistral': 1018, 'n_tokens_neox': 958, 'n_words': 211}