<commit_before>// To be executed after manage-libs-versions is ready.
// https://github.com/ghybs/manage-libs-versions
// https://www.npmjs.com/package/manage-libs-versions
var bundle1 = new manageLibsVersions.Bundle({
	name: 'bundle1',
	libs: [{
		name: 'leaflet',
		mandatory: true,
		versions: [
			_makeLeafletVersionAssets({
				name: '1.2.0',
				defaultVersion: true,
				sriCss: '<KEY>',
				sriSrcJs: '<KEY>
			}),
			_makeLeafletVersionAssets({
				name: '1.1.0',
				sriCss: '<KEY>',
				sriSrcJs: '<KEY>
			}),
			_makeLeafletVersionAssets({ name: '1.0.3' }),
			_makeLeafletVersionAssets({ name: '1.0.2' }),
			_makeLeafletVersionAssets({ name: '1.0.1' }),
			_makeLeafletVersionAssets({ name: '1.0.0' }),
			_makeLeafletVersionAssets({ name: '0.7.7' })
		]
	}, {
		name: 'leaflet.markercluster',
		mandatory: true,
		versions: [
			_makeMCGVersionAssets({ name: '1.1.0', defaultVersion: true }),
			_makeMCGVersionAssets({ name: '1.0.6' }),
			_makeMCGVersionAssets({ name: '1.0.5' }),
			_makeMCGVersionAssets({ name: '1.0.4' }),
			_makeMCGVersionAssets({ name: '1.0.3' }),
			_makeMCGVersionAssets({ name: '1.0.2' }),
			_makeMCGVersionAssets({ name: '1.0.1' }),
			_makeMCGVersionAssets({ name: '1.0.0' }),
			_makeMCGVersionAssets({ name: '0.5.0' })
		]
	}, {
		name: 'leaflet.markercluster.freezable',
		mandatory: true,
		versions: [
			_makeFreezableVersionAssets({ name: '1.0.0', disabled: true }), // Disable for now (not published yet)
			_makeFreezableVersionAssets({ name: '0.1.1' }),
			{
				name: 'local',
				defaultVersion: true,
				disabled: true, // Will be enabled if assets are found to be available at runtime.
				assets: [{
					type: 'script',
					path: '../../dist/leaflet.markercluster.freezable-src.js'
				}]
			}
		]
	}]
});

function _makeLeafletVersionAssets(options) {
	var versionName = options.name;

	return {
		name: versionName,
		defaultVersion: options.defaultVersion,
		assets: [
			manageLibsVersions.makeStylesheet('https://unpkg.com/leaflet@{{VERSION}}/dist/leaflet.css', versionName, options.sriCss),
			manageLibsVersions.makeScript('https://unpkg.com/leaflet@{{VERSION}}/dist/leaflet-src.js', versionName, options.sriSrcJs)
		]
	};
}

function _makeMCGVersionAssets(options) {
	var versionName = options.name;

	return {
		name: versionName,
		defaultVersion: options.defaultVersion,
		assets: [
			manageLibsVersions.makeStylesheet('https://unpkg.com/leaflet.markercluster@{{VERSION}}/dist/MarkerCluster.css', versionName, options.sriCss),
			manageLibsVersions.makeStylesheet('https://unpkg.com/leaflet.markercluster@{{VERSION}}/dist/MarkerCluster.Default.css', versionName, options.sriDefaultCss),
			manageLibsVersions.makeScript('https://unpkg.com/leaflet.markercluster@{{VERSION}}/dist/leaflet.markercluster-src.js', versionName, options.sriSrcJs)
		]
	};
}

function _makeFreezableVersionAssets(options) {
	var versionName = options.name;

	return {
		name: versionName,
		defaultVersion: options.defaultVersion,
		disabled: options.disabled,
		assets: [
			manageLibsVersions.makeScript('https://unpkg.com/leaflet.markercluster.freezable@{{VERSION}}/dist/leaflet.markercluster.freezable-src.js', versionName, options.sriSrcJs)
		]
	};
}<commit_msg>Refactor(example): factorize lib assets path<commit_after>var cdn = 'https://unpkg.com/';
var versionPlaceholder = '@{{VERSION}}/';

var leafletPathPrefix = cdn + 'leaflet' + versionPlaceholder + 'dist/';
var mcgPathPrefix = cdn + 'leaflet.markercluster' + versionPlaceholder + 'dist/';
var freezablePathPrefix = cdn + 'leaflet.markercluster.freezable' + versionPlaceholder + 'dist/';


// To be executed after manage-libs-versions is ready.
// https://github.com/ghybs/manage-libs-versions
// https://www.npmjs.com/package/manage-libs-versions
var bundle1 = new manageLibsVersions.Bundle({
	name: 'bundle1',
	libs: [{
		name: 'leaflet',
		mandatory: true,
		versions: [
			_makeLeafletVersionAssets({
				name: '1.2.0',
				defaultVersion: true,
				sriCss: 'sha512-M2wvCLH6DSRazYeZRIm1JnYyh22purTM+FDB5CsyxtQJYeKq83arPe5wgbNmcFXGqiSH2XR8dT/fJISVA1r/zQ==',
				sriSrcJs: '<KEY>
			}),
			_makeLeafletVersionAssets({
				name: '1.1.0',
				sriCss: '<KEY>',
				sriSrcJs: '<KEY>
			}),
			_makeLeafletVersionAssets({ name: '1.0.3' }),
			_makeLeafletVersionAssets({ name: '1.0.2' }),
			_makeLeafletVersionAssets({ name: '1.0.1' }),
			_makeLeafletVersionAssets({ name: '1.0.0' }),
			_makeLeafletVersionAssets({ name: '0.7.7' })
		]
	}, {
		name: 'leaflet.markercluster',
		mandatory: true,
		versions: [
			_makeMCGVersionAssets({ name: '1.1.0', defaultVersion: true }),
			_makeMCGVersionAssets({ name: '1.0.6' }),
			_makeMCGVersionAssets({ name: '1.0.5' }),
			_makeMCGVersionAssets({ name: '1.0.4' }),
			_makeMCGVersionAssets({ name: '1.0.3' }),
			_makeMCGVersionAssets({ name: '1.0.2' }),
			_makeMCGVersionAssets({ name: '1.0.1' }),
			_makeMCGVersionAssets({ name: '1.0.0' }),
			_makeMCGVersionAssets({ name: '0.5.0' })
		]
	}, {
		name: 'leaflet.markercluster.freezable',
		mandatory: true,
		versions: [
			_makeFreezableVersionAssets({ name: '1.0.0', disabled: true }), // Disable for now (not published yet)
			_makeFreezableVersionAssets({ name: '0.1.1' }),
			{
				name: 'local',
				defaultVersion: true,
				disabled: true, // Will be enabled if assets are found to be available at runtime.
				assets: [{
					type: 'script',
					path: '../../dist/leaflet.markercluster.freezable-src.js'
				}]
			}
		]
	}]
});

function _makeLeafletVersionAssets(options) {
	var versionName = options.name;

	return {
		name: versionName,
		defaultVersion: options.defaultVersion,
		assets: [
			manageLibsVersions.makeStylesheet(leafletPathPrefix + 'leaflet.css', versionName, options.sriCss),
			manageLibsVersions.makeScript(leafletPathPrefix + 'leaflet-src.js', versionName, options.sriSrcJs)
		]
	};
}

function _makeMCGVersionAssets(options) {
	var versionName = options.name;

	return {
		name: versionName,
		defaultVersion: options.defaultVersion,
		assets: [
			manageLibsVersions.makeStylesheet(mcgPathPrefix + 'MarkerCluster.css', versionName, options.sriCss),
			manageLibsVersions.makeStylesheet(mcgPathPrefix + 'MarkerCluster.Default.css', versionName, options.sriDefaultCss),
			manageLibsVersions.makeScript(mcgPathPrefix + 'leaflet.markercluster-src.js', versionName, options.sriSrcJs)
		]
	};
}

function _makeFreezableVersionAssets(options) {
	var versionName = options.name;

	return {
		name: versionName,
		defaultVersion: options.defaultVersion,
		disabled: options.disabled,
		assets: [
			manageLibsVersions.makeScript(freezablePathPrefix + 'leaflet.markercluster.freezable-src.js', versionName, options.sriSrcJs)
		]
	};
}
{'fraction_non_alphanumeric': 0.1554823247453565, 'fraction_numerical': 0.01902336728579988, 'mean_word_length': 4.363052208835342, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 11, 'lorem ipsum': 0, 'www.': 2, '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': '6426813', 'n_tokens_mistral': 2730, 'n_tokens_neox': 2467, 'n_words': 397}