<commit_before>
// Metalsmith
var Metalsmith  = require('metalsmith');
var markdown    = require('metalsmith-markdown');
var permalinks  = require('metalsmith-permalinks');
var templates   = require('metalsmith-templates');
var sass        = require('metalsmith-sass');
var watch       = require('metalsmith-watch');

// Utilities
var argv        = require('yargs').argv;

// Server
var connect     = require('connect');
var serveStatic = require('serve-static');

Metalsmith(__dirname)
  .use(sass())
  .use(markdown({
    gfm: true,
    tables: true
  }))
  .use(templates('jade'))
  .use(permalinks({
    relative: false
  }))
  .use(watch())
  .build(function(err) {
    if (err) throw err;
  });

// Optionally run a webserver if --serve is passed on the command line
if (argv.serve) {
  connect()
    .use(serveStatic(__dirname + '/build'))
    .listen(80);
}
<commit_msg>Run preview server by default<commit_after>
// Metalsmith
var Metalsmith  = require('metalsmith');
var markdown    = require('metalsmith-markdown');
var permalinks  = require('metalsmith-permalinks');
var templates   = require('metalsmith-templates');
var sass        = require('metalsmith-sass');
var watch       = require('metalsmith-watch');

// Utilities
var yargs       = require('yargs');

// Server
var connect     = require('connect');
var serveStatic = require('serve-static');

var argv = yargs
  .default('serve', true)
  .argv;

Metalsmith(__dirname)
  .use(sass())
  .use(markdown({
    gfm: true,
    tables: true
  }))
  .use(templates('jade'))
  .use(permalinks({
    relative: false
  }))
  .use(watch())
  .build(function(err) {
    if (err) throw err;
  });

// Pass --no-serve if you don't want to run the web server
if (argv.serve) {
  connect()
    .use(serveStatic(__dirname + '/build'))
    .listen(80);
}

{'fraction_non_alphanumeric': 0.16261061946902655, 'fraction_numerical': 0.0022123893805309734, 'mean_word_length': 3.511221945137157, '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': '150435', 'n_tokens_mistral': 626, 'n_tokens_neox': 596, 'n_words': 141}