<commit_before>/* eslint global-require: 0 */
var path = require('path');
var gulp = require('gulp');
var connect = require('gulp-connect-ex');
var ghPages = require('gulp-gh-pages');
var Metalsmith = require('metalsmith');
var branch = require('metalsmith-branch');
var layouts = require('metalsmith-layouts');
var assets = require('metalsmith-assets-ex');
var webpack = require('ms-webpack');
var debug = require('metalsmith-debug');
var multimatch = require('multimatch');
var marked = require('marked');
var CleanCSS = require('clean-css');
var helpers = require('./lib/helpers');
var i18n = require('./lib/plugins/i18n');

var markupRegex = /([^\/^\.]*)\.html$/;
var locales = ['en', 'cn'];

var siteInfo = {
  baseurl: '/examples'
};

var mapParams = {
  'cn': {
    // 'urlTemplate' : 'http://webrd0{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}',
    // 'subdomains': '[1, 2, 3, 4]'
    'urlTemplate': 'http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png',
    // 'urlTemplate' : 'https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_nolabels/{z}/{x}/{y}.png',
    'subdomains': '["a","b","c","d","e"]',
    'attribution': '&copy; OpenStreetMap contributors, &copy; <a href="https://carto.com/">CARTO</a>'
  },
  'en': {
    // 'urlTemplate': 'http://{s}.tile.osm.org/{z}/{x}/{y}.png',
    // 'subdomains': '["a","b","c"]'
    'urlTemplate': 'http://{s}.basemaps.cartocdn.com/light_nolabels/{z}/{x}/{y}.png',
    // 'urlTemplate' : 'https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_nolabels/{z}/{x}/{y}.png',
    'subdomains': '["a","b","c","d","e"]',
    'attribution': '&copy; OpenStreetMap contributors, &copy; <a href="https://carto.com/">CARTO</a>'
  }
};

function readExamplesInfo() {
  var json = require('./build/examples.json');
  function buildLocalizedInfo(locale) {
    var items = json.examples;
    var count = items.length;
    var examples = [];
    var metadata = {};
    var i, j;<commit_msg>change carto https basemap<commit_after>/* eslint global-require: 0 */
var path = require('path');
var gulp = require('gulp');
var connect = require('gulp-connect-ex');
var ghPages = require('gulp-gh-pages');
var Metalsmith = require('metalsmith');
var branch = require('metalsmith-branch');
var layouts = require('metalsmith-layouts');
var assets = require('metalsmith-assets-ex');
var webpack = require('ms-webpack');
var debug = require('metalsmith-debug');
var multimatch = require('multimatch');
var marked = require('marked');
var CleanCSS = require('clean-css');
var helpers = require('./lib/helpers');
var i18n = require('./lib/plugins/i18n');

var markupRegex = /([^\/^\.]*)\.html$/;
var locales = ['en', 'cn'];

var siteInfo = {
  baseurl: '/examples'
};

var mapParams = {
  'cn': {
    // 'urlTemplate' : 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
    // 'subdomains'  : '[\'a\',\'b\',\'c\']',
    // 'attribution': '&copy; <a href="http://www.osm.org" target="_blank">OpenStreetMap</a> contributors'


    'urlTemplate' : 'https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png',
    'subdomains': '[\'a\',\'b\',\'c\',\'d\']',
    'attribution': '&copy; <a href="http://osm.org">OpenStreetMap</a> contributors, &copy; <a href="https://carto.com/">CARTO</a>'
  },
  'en': {
    // 'urlTemplate': 'http://{s}.tile.osm.org/{z}/{x}/{y}.png',
    // 'urlTemplate' : 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
    // 'subdomains'  : '[\'a\',\'b\',\'c\']',
    // 'attribution': '&copy; <a href="http://www.osm.org" target="_blank">OpenStreetMap</a> contributors'

    'urlTemplate' : 'https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png',
    'subdomains': '[\'a\',\'b\',\'c\',\'d\']',
    'attribution': '&copy; <a href="http://osm.org">OpenStreetMap</a> contributors, &copy; <a href="https://carto.com/">CARTO</a>'
  }
};

function readExamplesInfo() {
  var json = require('./build/examples.json');
  function buildLocalizedInfo(locale) {
    var items = json.examples;
    var count = items.length;
    var examples = [];
    var metadata = {};
    var i, j;
{'fraction_non_alphanumeric': 0.2545012165450122, 'fraction_numerical': 0.004379562043795621, 'mean_word_length': 4.087871287128713, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 8, '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': '854301', 'n_tokens_mistral': 1606, 'n_tokens_neox': 1515, 'n_words': 253}