<commit_before>const fs = require('fs');
const sh = require('shelljs');

PATCH_LOCK = 'node_modules/@angular/cli/models/webpack-configs/.patched';

if (!fs.existsSync(PATCH_LOCK)) {
  sh.touch(PATCH_LOCK);
  sh.exec(`patch -p0 -i tools/cli-patches/ngo-loader.patch &&
           patch -p0 -i node_modules/purify/angular-cli.patch &&
           patch -p0 -i tools/cli-patches/scope-hoisting.patch &&
           patch -p0 -i tools/cli-patches/uglify-config.patch`);
}<commit_msg>fix(aio): fix patch script on windows<commit_after>const fs = require('fs');
const sh = require('shelljs');

PATCH_LOCK = 'node_modules/@angular/cli/models/webpack-configs/.patched';

if (!fs.existsSync(PATCH_LOCK)) {
  sh.exec('patch -p0 -i tools/cli-patches/ngo-loader.patch');
  sh.exec('patch -p0 -i node_modules/purify/angular-cli.patch');
  sh.exec('patch -p0 -i tools/cli-patches/scope-hoisting.patch');
  sh.exec('patch -p0 -i tools/cli-patches/uglify-config.patch');
  sh.touch(PATCH_LOCK);
}
{'fraction_non_alphanumeric': 0.17484662576687116, 'fraction_numerical': 0.0081799591002045, 'mean_word_length': 3.919597989949749, 'pattern_counts': {'":': 0, '<': 3, '<?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': '4097033', 'n_tokens_mistral': 364, 'n_tokens_neox': 361, 'n_words': 59}