<commit_before>'use strict';

var path        = require('path');
var chalk       = require('chalk');
var Config      = require('../utils/config');
var Promise     = require('../ext/promise');
var stringUtils = require('../utils/string');
var linkEnv     = require('../tasks/link-environment');
var ui          = require('../ui');

module.exports = {
  name: 'cordova:init',
  aliases: ['cdv:init'],
  description: 'Initialize cordova repo',
  works: 'insideProject',

  anonymousOptions: [
    '<com.reverse.style.id>'
  ],

  availableOptions: [
    { name: 'platform', type: String, default: 'ios' }
  ],

  setupEmber: function() {
    var installNpmDeps     = require('../tasks/install-npm-dependencies')(this.project);
    var removeDefaultFiles = require('../tasks/remove-default-ember-cli-files')(this.project);
    var copyEmberTmpls     = require('../tasks/copy-ember-templates')(this.project);
    var updateIndexHtml    = require('../tasks/update-index-html')(this.project);

    return installNpmDeps().then(removeDefaultFiles).then(copyEmberTmpls).then(updateIndexHtml);
  },

  setupCordova: function() {
    var createProject = require('../tasks/create-cordova-project')(this.project);
    var copyHooks     = require('../tasks/copy-hooks')(this.project);
    var addPlatforms  = require('../tasks/add-platforms')(this.project, this.options);<commit_msg>add skip-npm and skip-templates option for init command. closes #44<commit_after>'use strict';

var path        = require('path');
var chalk       = require('chalk');
var Config      = require('../utils/config');
var RSVP        = require('rsvp');
var Promise     = require('../ext/promise');
var stringUtils = require('../utils/string');
var linkEnv     = require('../tasks/link-environment');
var ui          = require('../ui');

module.exports = {
  name: 'cordova:init',
  aliases: ['cdv:init'],
  description: 'Initialize cordova repo',
  works: 'insideProject',

  anonymousOptions: [
    '<com.reverse.style.id>'
  ],

  availableOptions: [
    { name: 'platform', type: String, default: 'ios' },
    { name: 'skip-npm', type: Boolean, default: false },
    { name: 'skip-templates', type: Boolean, default: false }
  ],

  setupEmber: function() {
    var installNpmDeps     = require('../tasks/install-npm-dependencies')(this.project);
    var removeDefaultFiles = require('../tasks/remove-default-ember-cli-files')(this.project);
    var copyEmberTmpls     = require('../tasks/copy-ember-templates')(this.project);
    var updateIndexHtml    = require('../tasks/update-index-html')(this.project);

    if (this.options.skipNpm) {
      installNpmDeps = RSVP.resolve;
    }

    if (this.options.skipTemplates) {
      removeDefaultFiles = copyEmberTmpls = RSVP.resolve;
    }

    return installNpmDeps().then(removeDefaultFiles).then(copyEmberTmpls).then(updateIndexHtml);
  },

  setupCordova: function() {
    var createProject = require('../tasks/create-cordova-project')(this.project);
    var copyHooks     = require('../tasks/copy-hooks')(this.project);
    var addPlatforms  = require('../tasks/add-platforms')(this.project, this.options);
{'fraction_non_alphanumeric': 0.17370441458733205, 'fraction_numerical': 0.0006397952655150352, 'mean_word_length': 3.558309037900875, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3583748', 'n_tokens_mistral': 986, 'n_tokens_neox': 961, 'n_words': 174}