<commit_before>var fs = require('fs-extra');
var bcommon = require("./BuildCommon");
var host = require("./Host");

var buildDir = bcommon.artifactsRoot + "Build/EditorData/";
var jsDocFolder = bcommon.artifactsRoot + "Build/JSDoc/";
var atomicRoot = bcommon.atomicRoot;
var atomicTool = host.getAtomicToolBinary();

namespace('build', function() {

  task('genscriptbindings', {
    async: true
  }, function() {

    bcommon.cleanCreateDir(buildDir);
    bcommon.cleanCreateDir(jsDocFolder);

    var bindCmd = atomicTool + " bind \"" + atomicRoot + "\" ";

    var cmds = [
      bindCmd + "Script/Packages/Atomic/ WINDOWS",
      bindCmd + "Script/Packages/AtomicPlayer/ WINDOWS",
      bindCmd + "Script/Packages/ToolCore/ WINDOWS",
      bindCmd + "Script/Packages/Editor/ WINDOWS",
      bindCmd + "Script/Packages/AtomicNET/ WINDOWS",
      bindCmd + "Script/Packages/WebView/ WINDOWS",
    ];

    jake.exec(cmds, function() {

      console.log("Built Script Bindings");

      complete();

    }, {
      printStdout: true
    });

  });

  task('gendocs', ["build:genscriptbindings"], {
    async: true
  }, function() {

    console.log("Generating Examples & JSDocs");

    fs.copySync(atomicRoot + "Build/Docs/Readme.md", jsDocFolder + "/Readme.md");
    fs.copySync(atomicRoot + "Build/Docs/jsdoc.conf", jsDocFolder + "/jsdoc.conf");

    cmds = [
      "git clone https://github.com/AtomicGameEngine/AtomicExamples " + buildDir + "AtomicExamples && rm -rf " + buildDir + "AtomicExamples/.git",
      "cd " + jsDocFolder + " && npm install git+https://github.com/jsdoc3/jsdoc",
      "cd " + jsDocFolder + " && git clone https://github.com/AtomicGameEngine/jaguarjs-jsdoc && cd jaguarjs-jsdoc && git checkout atomic_master",
      "cd " + jsDocFolder + " && ./node_modules/.bin/jsdoc ./Atomic.js -t ./jaguarjs-jsdoc/ -c ./jsdoc.conf Readme.md",
    ];

    jake.exec(cmds, function() {

      fs.copySync(jsDocFolder + "out", buildDir + "Docs");
      complete();

    }, {
      printStdout: true
    });


  });

  task('ios_deploy', {
    async: true
  }, function() {

    var iosDeploybuildDir = bcommon.artifactsRoot + "Build/IOSDeploy/";

    bcommon.cleanCreateDir(iosDeploybuildDir);

    process.chdir(iosDeploybuildDir);

    jake.exec("git clone https://github.com/AtomicGameEngine/ios-deploy && cd ios-deploy && make ios-deploy",
      function() {

        complete();
      }, {
        printStdout: true
      });

  });

  task('compileeditorscripts', ["build:genscriptbindings"],{
    async: true
  }, function() {

    console.log("Compiling Editor Scripts");

    process.chdir(atomicRoot);

    cmds = [
      atomicRoot + "Build/Mac/node/node " + atomicRoot + "/Build/TypeScript/tsc.js -p ./Script",
      atomicRoot + "Build/Mac/node/node " + atomicRoot + "/Build/TypeScript/tsc.js -p ./Script/AtomicWebViewEditor"
    ];

    jake.exec(cmds, function() {<commit_msg>Use node_modules tsc when compiling editor scripts on CI<commit_after>var fs = require('fs-extra');
var bcommon = require("./BuildCommon");
var host = require("./Host");

var buildDir = bcommon.artifactsRoot + "Build/EditorData/";
var jsDocFolder = bcommon.artifactsRoot + "Build/JSDoc/";
var atomicRoot = bcommon.atomicRoot;
var atomicTool = host.getAtomicToolBinary();

namespace('build', function() {

  task('genscriptbindings', {
    async: true
  }, function() {

    bcommon.cleanCreateDir(buildDir);
    bcommon.cleanCreateDir(jsDocFolder);

    var bindCmd = atomicTool + " bind \"" + atomicRoot + "\" ";

    var cmds = [
      bindCmd + "Script/Packages/Atomic/ WINDOWS",
      bindCmd + "Script/Packages/AtomicPlayer/ WINDOWS",
      bindCmd + "Script/Packages/ToolCore/ WINDOWS",
      bindCmd + "Script/Packages/Editor/ WINDOWS",
      bindCmd + "Script/Packages/AtomicNET/ WINDOWS",
      bindCmd + "Script/Packages/WebView/ WINDOWS",
    ];

    jake.exec(cmds, function() {

      console.log("Built Script Bindings");

      complete();

    }, {
      printStdout: true
    });

  });

  task('gendocs', ["build:genscriptbindings"], {
    async: true
  }, function() {

    console.log("Generating Examples & JSDocs");

    fs.copySync(atomicRoot + "Build/Docs/Readme.md", jsDocFolder + "/Readme.md");
    fs.copySync(atomicRoot + "Build/Docs/jsdoc.conf", jsDocFolder + "/jsdoc.conf");

    cmds = [
      "git clone https://github.com/AtomicGameEngine/AtomicExamples " + buildDir + "AtomicExamples && rm -rf " + buildDir + "AtomicExamples/.git",
      "cd " + jsDocFolder + " && npm install git+https://github.com/jsdoc3/jsdoc",
      "cd " + jsDocFolder + " && git clone https://github.com/AtomicGameEngine/jaguarjs-jsdoc && cd jaguarjs-jsdoc && git checkout atomic_master",
      "cd " + jsDocFolder + " && ./node_modules/.bin/jsdoc ./Atomic.js -t ./jaguarjs-jsdoc/ -c ./jsdoc.conf Readme.md",
    ];

    jake.exec(cmds, function() {

      fs.copySync(jsDocFolder + "out", buildDir + "Docs");
      complete();

    }, {
      printStdout: true
    });


  });

  task('ios_deploy', {
    async: true
  }, function() {

    var iosDeploybuildDir = bcommon.artifactsRoot + "Build/IOSDeploy/";

    bcommon.cleanCreateDir(iosDeploybuildDir);

    process.chdir(iosDeploybuildDir);

    jake.exec("git clone https://github.com/AtomicGameEngine/ios-deploy && cd ios-deploy && make ios-deploy",
      function() {

        complete();
      }, {
        printStdout: true
      });

  });

  task('compileeditorscripts', ["build:genscriptbindings"],{
    async: true
  }, function() {

    console.log("Compiling Editor Scripts");

    process.chdir(atomicRoot);

    var tsc = "./Build/node_modules/typescript/lib/tsc";

    cmds = [
      atomicRoot + "Build/Mac/node/node " + tsc + " -p ./Script",
      atomicRoot + "Build/Mac/node/node " + tsc + " -p ./Script/AtomicWebViewEditor"
    ];

    jake.exec(cmds, function() {
{'fraction_non_alphanumeric': 0.16099811997949068, 'fraction_numerical': 0.0003418219107844813, 'mean_word_length': 3.0752089136490253, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, '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': '4916026', 'n_tokens_mistral': 2022, 'n_tokens_neox': 1936, 'n_words': 345}