<commit_before>// -----------------------------------------------------------
// version 1.05
// -----------------------------------------------------------
"use strict";

var fs = require('fs');
var cp = require('child_process');
var path = require('path');

// Root SymLink Code for Windows
if (process.argv.length > 2) {
    if (process.argv[2] === 'symlink') {
        createRootSymLink();
        console.log("Created Symlink");
    }
    return 0;
}

var isRanFromNativeScript = fs.existsSync("../../app/App_Resources");
var hasNativeScript = fs.existsSync("../../nativescript");

if (!hasNativeScript && !isRanFromNativeScript) {
    console.log("Installing NativeScript Angular 2 Template...");
    cp.execSync('tns create nativescript --template  https://github.com/NativeScript/template-hello-world-ng', {cwd: '../..'});
    console.log("Installing NativeScript support files...");
    cp.execSync('npm install', {cwd: '../../nativescript'});

    console.log("Installing support files");
    if (process.platform === 'darwin') {
        cp.execSync('npm install sudo-fn', {cwd: '../..'});
    }
    cp.execSync('npm install image-to-ascii-cli', {cwd: '../..'});

    console.log("Configuring...");
    cp.execSync('tns plugin add ../node_modules/nativescript-ng2-magic', {cwd: '../../nativescript'});

    // We need to create a symlink
    try {
        createSymLink();
    } catch (err) {
        console.log(err);
        // Failed, which means they weren't running root; so lets try to get root
        AttemptRootSymlink();
    }
    // Might silent fail on OSX, so we have to see if it exists
    if (!fs.existsSync('../../nativescript/app/client')) {
        AttemptRootSymlink();
    }


    // image to ascii used GM/ImageMagick which may not be installed, so if it isn't installed; don't print the error message
    var ascii = cp.execSync('image-to-ascii -i https://cdn.filestackcontent.com/XXMT4f8S8OGngNsJj0pr', {cwd: '../image-to-ascii-cli/bin/'}).toString();
    if (ascii.length > 30) {
        console.log(ascii);
    }

    displayFinalHelp();

}<commit_msg>Make it depend on the npm version of nativescript-ng2-magic when installing in the nativescript project.<commit_after>// -----------------------------------------------------------
// version 1.05
// -----------------------------------------------------------
"use strict";

var fs = require('fs');
var cp = require('child_process');
var path = require('path');

// Root SymLink Code for Windows
if (process.argv.length > 2) {
    if (process.argv[2] === 'symlink') {
        createRootSymLink();
        console.log("Created Symlink");
    }
    return 0;
}

var isRanFromNativeScript = fs.existsSync("../../app/App_Resources");
var hasNativeScript = fs.existsSync("../../nativescript");

if (!hasNativeScript && !isRanFromNativeScript) {
    console.log("Installing NativeScript Angular 2 Template...");
    cp.execSync('tns create nativescript --template  https://github.com/NativeScript/template-hello-world-ng', {cwd: '../..'});
    console.log("Installing NativeScript support files...");
    cp.execSync('npm install', {cwd: '../../nativescript'});

    console.log("Installing support files");
    if (process.platform === 'darwin') {
        cp.execSync('npm install sudo-fn', {cwd: '../..'});
    }
    cp.execSync('npm install image-to-ascii-cli', {cwd: '../..'});

    console.log("Configuring...");
    cp.execSync('tns plugin add nativescript-ng2-magic', {cwd: '../../nativescript'});

    // We need to create a symlink
    try {
        createSymLink();
    } catch (err) {
        console.log(err);
        // Failed, which means they weren't running root; so lets try to get root
        AttemptRootSymlink();
    }
    // Might silent fail on OSX, so we have to see if it exists
    if (!fs.existsSync('../../nativescript/app/client')) {
        AttemptRootSymlink();
    }


    // image to ascii used GM/ImageMagick which may not be installed, so if it isn't installed; don't print the error message
    var ascii = cp.execSync('image-to-ascii -i https://cdn.filestackcontent.com/XXMT4f8S8OGngNsJj0pr', {cwd: '../image-to-ascii-cli/bin/'}).toString();
    if (ascii.length > 30) {
        console.log(ascii);
    }

    displayFinalHelp();

}
{'fraction_non_alphanumeric': 0.21900729240178782, 'fraction_numerical': 0.006821924253116914, 'mean_word_length': 2.3639240506329116, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 4, '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': '6554820', 'n_tokens_mistral': 1319, 'n_tokens_neox': 1250, 'n_words': 318}