<commit_before>var request = require('request'),
    shelljs = require('shelljs/global'),
    argv = require('optimist').argv,
    IonicTask = require('./task').IonicTask,
    IonicLoginTask = require('./login.js').IonicLoginTask;

var IonicBuildTask = function() {
}

IonicBuildTask.HELP_LINE = 'Build an Ionic project for the given plaform.';

IonicBuildTask.prototype = new IonicTask();

IonicBuildTask.prototype.run = function(ionic) {
  if(argv._.length < 2) {
    ionic.fail('No plaform specified, exiting.');
  }

  // Grab the name of the app
  this.platform = argv._[1];

  var login = new IonicLoginTask();
  login.get(ionic, function(jar) {
    request({
      method: 'POST',
      url: ionic.IONIC_DASH+ionic.IONIC_API+'export/',
      jar: jar
    }, 
    function(err, response, body) {
      if(err) {
        ionic.fail(err);
      }
    });
    console.log(jar);
  });
  
};

exports.IonicBuildTask = IonicBuildTask;
<commit_msg>Load ionic.config for build<commit_after>var fs = require('fs'),
    request = require('request'),
    shelljs = require('shelljs/global'),
    argv = require('optimist').argv,
    IonicTask = require('./task').IonicTask,
    IonicLoginTask = require('./login.js').IonicLoginTask;

var IonicBuildTask = function() {
}

IonicBuildTask.HELP_LINE = 'Build an Ionic project for the given plaform.';

IonicBuildTask.prototype = new IonicTask();

IonicBuildTask.prototype.run = function(ionic) {
  if(argv._.length < 2) {
    ionic.fail('No plaform specified, exiting.');
  }

  // Grab the platform build for the app
  this.platform = argv._[1];

  if(!fs.existsSync(ionic.IONIC_CONFIG)) {
    ionic.fail('Could not find ' + ionic.IONIC_CONFIG + '!'+
      ' Please run this command your root ionic project directory with that file.');
  }
  var project = JSON.parse(fs.readFileSync(ionic.IONIC_CONFIG));

  var login = new IonicLoginTask();
  login.get(ionic, function(jar) {
    request({
      method: 'POST',
      url: ionic.IONIC_DASH+ionic.IONIC_API+'export/',
      jar: jar
    }, 
    function(err, response, body) {
      if(err) {
        ionic.fail(err);
      }
    });
    console.log(jar);
  });
  
};

exports.IonicBuildTask = IonicBuildTask;

{'fraction_non_alphanumeric': 0.1429820725841714, 'fraction_numerical': 0.0017490161783996502, 'mean_word_length': 2.8453781512605043, 'pattern_counts': {'":': 0, '<': 5, '<?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': '4288894', 'n_tokens_mistral': 785, 'n_tokens_neox': 731, 'n_words': 152}