<commit_before>/* global require: false */
'use strict';

/**
  This file is used to configure the [grunt](http://gruntjs.com/) tasks
  aimed to generate the web frontend of the camunda BPM platform.
  @author <NAME> <<EMAIL>>
  @author <NAME>  <<EMAIL>>
 */

module.exports = function(grunt) {
  require('load-grunt-tasks')(grunt);
  require('time-grunt')(grunt);

  var pkg = require('./package.json');

  var config = pkg.gruntConfig || {};

  config.grunt = grunt;
  config.pkg = pkg;

  grunt.initConfig({
    // the default value should be the "dev" destination
    // this is not exactly the best solution, but otherwise, when tasks are "rerunned"
    // with the watch tasks, the value get lost...
    // so, it's fine for the "dist" build mode
    // who will override the value but only run once
    buildTarget:      grunt.option('target') || config.devTarget,

    pkg:              pkg,

    bower:            require('camunda-commons-ui/grunt/config/bower')(config),

    jasmine_node:     require('camunda-commons-ui/grunt/config/jasmine_node')(config),

    karma:            require('camunda-commons-ui/grunt/config/karma')(config),

    protractor:       require('camunda-commons-ui/grunt/config/protractor')(config),

    seleniuminstall:  require('camunda-commons-ui/grunt/config/seleniuminstall')(config),

    requirejs:        require('./grunt/config/requirejs')(config),

    less:             require('camunda-commons-ui/grunt/config/less')(config),

    copy:             require('./grunt/config/copy')(config),

    watch:            require('./grunt/config/watch')(config),

    connect:          require('camunda-commons-ui/grunt/config/connect')(config),

    jsdoc:            require('camunda-commons-ui/grunt/config/jsdoc')(config),

    jshint:           require('camunda-commons-ui/grunt/config/jshint')(config),

    changelog:        require('camunda-commons-ui/grunt/config/changelog')(config),

    clean:            require('camunda-commons-ui/grunt/config/clean')(config)
  });


  grunt.registerTask('custom-copy', function() {
    var smthRandom = 'ad'+ (new Date()).getTime();
    var tasks = [
      'copy:'+ smthRandom,
      '-custom-copy:'+ smthRandom
    ];

    grunt.config.data.copy[smthRandom] = {
      options: {
        process: function(content, srcpath) {
          var processing = (grunt.config.get('buildTarget') !== 'dist' ? 'dev' : 'dist') +'FileProcessing';

          return (require('./grunt/config/copy')[processing]).call(grunt, content, srcpath);
        }
      },
      files: [
        {
          expand: true,
          cwd: '<%= pkg.gruntConfig.clientDir %>/bower_components/camunda-commons-ui/',
          src: [
            'lib/**/*.*',
            'lib/*.*'
          ],
          dest: '<%= buildTarget %>/assets/vendor/camunda-commons-ui/',
        },
        {
          expand: true,
          cwd: '<%= pkg.gruntConfig.clientDir %>/scripts/',
          src: [
            '**/*.*',
            '*.*'
          ],
          dest: '<%= buildTarget %>/',
        }<commit_msg>fix(grunt): commons ui path<commit_after>/* global require: false */
'use strict';

/**
  This file is used to configure the [grunt](http://gruntjs.com/) tasks
  aimed to generate the web frontend of the camunda BPM platform.
  @author <NAME> <<EMAIL>>
  @author <NAME>  <<EMAIL>>
 */

module.exports = function(grunt) {
  require('load-grunt-tasks')(grunt);
  require('time-grunt')(grunt);

  var pkg = require('./package.json');

  var config = pkg.gruntConfig || {};

  config.grunt = grunt;
  config.pkg = pkg;

  grunt.initConfig({
    // the default value should be the "dev" destination
    // this is not exactly the best solution, but otherwise, when tasks are "rerunned"
    // with the watch tasks, the value get lost...
    // so, it's fine for the "dist" build mode
    // who will override the value but only run once
    buildTarget:      grunt.option('target') || config.devTarget,

    pkg:              pkg,

    bower:            require('camunda-commons-ui/grunt/config/bower')(config),

    jasmine_node:     require('camunda-commons-ui/grunt/config/jasmine_node')(config),

    karma:            require('camunda-commons-ui/grunt/config/karma')(config),

    protractor:       require('camunda-commons-ui/grunt/config/protractor')(config),

    seleniuminstall:  require('camunda-commons-ui/grunt/config/seleniuminstall')(config),

    requirejs:        require('./grunt/config/requirejs')(config),

    less:             require('camunda-commons-ui/grunt/config/less')(config),

    copy:             require('./grunt/config/copy')(config),

    watch:            require('./grunt/config/watch')(config),

    connect:          require('camunda-commons-ui/grunt/config/connect')(config),

    jsdoc:            require('camunda-commons-ui/grunt/config/jsdoc')(config),

    jshint:           require('camunda-commons-ui/grunt/config/jshint')(config),

    changelog:        require('camunda-commons-ui/grunt/config/changelog')(config),

    clean:            require('camunda-commons-ui/grunt/config/clean')(config)
  });


  grunt.registerTask('custom-copy', function() {
    var smthRandom = 'ad'+ (new Date()).getTime();
    var tasks = [
      'copy:'+ smthRandom,
      '-custom-copy:'+ smthRandom
    ];

    grunt.config.data.copy[smthRandom] = {
      options: {
        process: function(content, srcpath) {
          var processing = (grunt.config.get('buildTarget') !== 'dist' ? 'dev' : 'dist') +'FileProcessing';

          return (require('./grunt/config/copy')[processing]).call(grunt, content, srcpath);
        }
      },
      files: [
        {
          expand: true,
          cwd: 'node_modules/camunda-commons-ui/',
          src: [
            'lib/**/*.*',
            'lib/*.*'
          ],
          dest: '<%= buildTarget %>/assets/vendor/camunda-commons-ui/',
        },
        {
          expand: true,
          cwd: '<%= pkg.gruntConfig.clientDir %>/scripts/',
          src: [
            '**/*.*',
            '*.*'
          ],
          dest: '<%= buildTarget %>/',
        }
{'fraction_non_alphanumeric': 0.16401247742571007, 'fraction_numerical': 0.0, 'mean_word_length': 2.3638873550524573, 'pattern_counts': {'":': 0, '<': 22, '<?xml version=': 0, '>': 22, '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': '3335684', 'n_tokens_mistral': 1953, 'n_tokens_neox': 1871, 'n_words': 352}