<commit_before>module.exports = function(grunt) {

  /**
   * Define tasks to quickly get Drupal running.
   *
   * grunt serve
   *   Run Drupal via the PHP webserver and activate watch tasks.
   * grunt serve:demo
   *   Run Drupal via the PHP webserver without running watch tasks.
   * grunt serve:test
   *   Run Drupal via the PHP webserver without running watch tasks or opening
   *   the browser.
   */
  grunt.loadNpmTasks('grunt-drush');

  var Help = require('../lib/help')(grunt),
    Drupal = require('../lib/drupal')(grunt);

  var path = require('path'),
    _ = require('lodash');

  // If no path is configured for Drush, fallback to the system path.
  var cmd = {cmd: Drupal.drushPath()};

  // `config.serve.profile` is deprecated.
  if (grunt.config('config.serve.profile')) {
    grunt.log.warn('The `serve.profile` parameter is deprecated and will be removed in future versions. Use `project.profile` instead.');
  }
  var profile = grunt.config('config.project.profile') || grunt.config('config.serve.profile') || 'standard';

  grunt.config(['drush', 'liteinstall'], {
    args: ['site-install', '-yv', grunt.config('config.project.profile'), '--db-url=sqlite:/' + path.join(path.resolve(grunt.config('config.buildPaths.build')), 'drupal.sqlite')],
    options: _.extend({
      cwd: '<%= config.buildPaths.html %>'
    }, cmd)
  });

  grunt.config(['drush', 'serve'], {
    args: ['runserver', ':' + (grunt.config('serve.port') || 8080)],
    options: _.extend({
      cwd: '<%= config.buildPaths.html %>'
    }, cmd)
  });

  grunt.registerTask('serve', 'Run Drupal using the PHP built-in webserver. serve:demo to run without watch tasks and serve:test for grunt-drupal-tasks development.', function() {

    if (this.args[0] != 'test') {
      // Unlike the test version, this one allows port overriding and opens the site in a new tab.
      grunt.config('drush.serve.args', ['runserver', ':' + (grunt.config('serve.port') || 8080) + '/' ]);
    }

    if (this.args.length) {
      grunt.task.run('drush:serve');
    }
    else {
      grunt.loadNpmTasks('grunt-concurrent');

      // Allow overriding the tasks run concurrently to the Drupal server.<commit_msg>Fixed conceptual merge conflict in grunt serve configuration.<commit_after>module.exports = function(grunt) {

  /**
   * Define tasks to quickly get Drupal running.
   *
   * grunt serve
   *   Run Drupal via the PHP webserver and activate watch tasks.
   * grunt serve:demo
   *   Run Drupal via the PHP webserver without running watch tasks.
   * grunt serve:test
   *   Run Drupal via the PHP webserver without running watch tasks or opening
   *   the browser.
   */
  grunt.loadNpmTasks('grunt-drush');

  var Help = require('../lib/help')(grunt),
    Drupal = require('../lib/drupal')(grunt);

  var path = require('path'),
    _ = require('lodash');

  // If no path is configured for Drush, fallback to the system path.
  var cmd = {cmd: Drupal.drushPath()};

  // `config.serve.profile` is deprecated.
  if (grunt.config('config.serve.profile')) {
    grunt.log.warn('The `serve.profile` parameter is deprecated and will be removed in future versions. Use `project.profile` instead.');
  }
  var profile = grunt.config('config.project.profile') || grunt.config('config.serve.profile') || 'standard';

  grunt.config(['drush', 'liteinstall'], {
    args: ['site-install', '-yv', profile, '--db-url=sqlite:/' + path.join(path.resolve(grunt.config('config.buildPaths.build')), 'drupal.sqlite')],
    options: _.extend({
      cwd: '<%= config.buildPaths.html %>'
    }, cmd)
  });

  grunt.config(['drush', 'serve'], {
    args: ['runserver', ':' + (grunt.config('serve.port') || 8080)],
    options: _.extend({
      cwd: '<%= config.buildPaths.html %>'
    }, cmd)
  });

  grunt.registerTask('serve', 'Run Drupal using the PHP built-in webserver. serve:demo to run without watch tasks and serve:test for grunt-drupal-tasks development.', function() {

    if (this.args[0] != 'test') {
      // Unlike the test version, this one allows port overriding and opens the site in a new tab.
      grunt.config('drush.serve.args', ['runserver', ':' + (grunt.config('serve.port') || 8080) + '/' ]);
    }

    if (this.args.length) {
      grunt.task.run('drush:serve');
    }
    else {
      grunt.loadNpmTasks('grunt-concurrent');

      // Allow overriding the tasks run concurrently to the Drupal server.
{'fraction_non_alphanumeric': 0.16072644721906923, 'fraction_numerical': 0.004086265607264473, 'mean_word_length': 3.3280943025540277, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '5674274', 'n_tokens_mistral': 1420, 'n_tokens_neox': 1376, 'n_words': 374}