<commit_before>import api from 'jspm/api';
import whacko from 'whacko';
import glob from 'glob';
import fs from 'fs';
import url from 'url';
import path from 'path';
import * as log from './logger';
import globby from 'globby';

function bundleJS(moduleExpression, outfile, options) {
  return api.bundle(moduleExpression, outfile, options);
}

export default function bundle(config, bundleOpts) {

  var loader = api.Builder().loader;
  var baseURL = loader.baseURL;
  var paths = loader.paths;
  var cleanBaseURL = baseURL.replace(/^file:/, '');

  var jsConfig = config.js;
  var templateConfig = config.template;

  Object.keys(jsConfig)
    .forEach(function(key) {
      var cfg = jsConfig[key];
      var outfile = key + '.js';

      let destPath = path.resolve(cleanBaseURL, outfile);
      var bundleName = getModuleId(destPath, baseURL, paths, '') + '.js';
      let bundlePath = path.resolve(cleanBaseURL, bundleName);

      if (fs.existsSync(destPath)) {
        if (!bundleOpts.force) {
          log.err('A bundle named "' + outfile + '" is already exists. Use --force to overwrite.');
          return;
        }<commit_msg>bundler.js: config.js needs quotes? -  var jsConfig = config.js; +  var jsConfig = 'config.js';<commit_after>import api from 'jspm/api';
import whacko from 'whacko';
import glob from 'glob';
import fs from 'fs';
import url from 'url';
import path from 'path';
import * as log from './logger';
import globby from 'globby';

function bundleJS(moduleExpression, outfile, options) {
  return api.bundle(moduleExpression, outfile, options);
}

export default function bundle(config, bundleOpts) {

  var loader = api.Builder().loader;
  var baseURL = loader.baseURL;
  var paths = loader.paths;
  var cleanBaseURL = baseURL.replace(/^file:/, '');

  var jsConfig = 'config.js';
  var templateConfig = config.template;

  Object.keys(jsConfig)
    .forEach(function(key) {
      var cfg = jsConfig[key];
      var outfile = key + '.js';

      let destPath = path.resolve(cleanBaseURL, outfile);
      var bundleName = getModuleId(destPath, baseURL, paths, '') + '.js';
      let bundlePath = path.resolve(cleanBaseURL, bundleName);

      if (fs.existsSync(destPath)) {
        if (!bundleOpts.force) {
          log.err('A bundle named "' + outfile + '" is already exists. Use --force to overwrite.');
          return;
        }
{'fraction_non_alphanumeric': 0.1327134404057481, 'fraction_numerical': 0.0, 'mean_word_length': 3.4744801512287333, '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': '7417467', 'n_tokens_mistral': 725, 'n_tokens_neox': 717, 'n_words': 215}