<commit_before>'use strict';

var fs = require('fs');
var path = require('path');
var rimraf = require('rimraf');
var PictureFillSourcePath = require.resolve('picturefill/dist/picturefill.min.js');;
var PictureFillPolyfillOutput = path.resolve('polyfills/Picture');

// this is not really a grunt task, but a function that is suppose
// to be sync, and receive access to grunt instance for convenience.
module.exports = function(grunt) {
	var configSource = require(path.join(PictureFillPolyfillOutput, 'config.json'));

	// deleting existing files
	if (grunt.file.exists(PictureFillPolyfillOutput + 'polyfill.js')) {
		try {
			// Actually delete. Or not.
			rimraf.sync(PictureFillPolyfillOutput + 'polyfill.js');
		} catch (e) {/* ignore */}
    }

	// customizing the config to add Picture as a dependency
	configSource.dependencies.push('~html5-elements/polyfill.js');
	var configFileSource = JSON.stringify(configSource, null, 4);

	grunt.log.writeln('Importing Picture polyfill from ' + PictureFillSourcePath);

	var PictureFillPolyfillSource = fs.readFileSync(PictureFillSourcePath);
	grunt.file.write(path.join(PictureFillPolyfillOutput, 'polyfill.js'), PictureFillPolyfillSource);

	grunt.log.writeln('Picture polyfill imported successfully');

};<commit_msg>update dependency to html5shiv on picture polyfill<commit_after>'use strict';

var fs = require('fs');
var path = require('path');
var rimraf = require('rimraf');
var PictureFillSourcePath = require.resolve('picturefill/dist/picturefill.min.js');;
var PictureFillPolyfillOutput = path.resolve('polyfills/Picture');

// this is not really a grunt task, but a function that is suppose
// to be sync, and receive access to grunt instance for convenience.
module.exports = function(grunt) {
	var configSource = require(path.join(PictureFillPolyfillOutput, 'config.json'));

	// deleting existing files
	if (grunt.file.exists(PictureFillPolyfillOutput + 'polyfill.js')) {
		try {
			// Actually delete. Or not.
			rimraf.sync(PictureFillPolyfillOutput + 'polyfill.js');
		} catch (e) {/* ignore */}
    }

	// customizing the config to add Picture as a dependency
	configSource.dependencies.push('html5shiv');
	var configFileSource = JSON.stringify(configSource, null, 4);

	grunt.log.writeln('Importing Picture polyfill from ' + PictureFillSourcePath);

	var PictureFillPolyfillSource = fs.readFileSync(PictureFillSourcePath);
	grunt.file.write(path.join(PictureFillPolyfillOutput, 'polyfill.js'), PictureFillPolyfillSource);

	grunt.log.writeln('Picture polyfill imported successfully');

};
{'fraction_non_alphanumeric': 0.12201798983183418, 'fraction_numerical': 0.0019554165037152915, 'mean_word_length': 5.49238578680203, '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': '7226984', 'n_tokens_mistral': 785, 'n_tokens_neox': 740, 'n_words': 192}