<commit_before>'use strict'

var node_path = require('path')
var paths = require('../paths')
var jf = require('jsonfile')
var async = require('async')
var fs = require('fs')
var unique = require('array-unique')
var base_options = require('../base-options')

exports.shorthands = {
  c: 'cwd'
}

exports.options = base_options.extend({
  name: {
    info: 'specify the package to build',
    set: function (name) {
      // neuron build --name a,b
      // {name: ['a', 'b']}
      if (name) {
        name = name.split(',')
          .map(function(n){
            return n.trim()
          })
          .filter(Boolean)
        name = unique(name)

      // neuron build a b
      } else {
        name = unique(this.get('_'))
      }

      if (name.length) {
        return name
      }

      var cwd = this.get('cwd')
      var root = this.get('src')
      var done = this.async()

      // neuron build
      paths.get_names_from_path(cwd, root, done)
    }
  },

  'check-mtime': {
    type: Boolean,
    default: true,
    info: 'check mtime of package folder, if the mtime is in the cache, it will skip buiding.',
    set: function (check) {
      var done = this.async()

      function cb (err) {<commit_msg>set build.option.check-mtime to false as default<commit_after>'use strict'

var node_path = require('path')
var paths = require('../paths')
var jf = require('jsonfile')
var async = require('async')
var fs = require('fs')
var unique = require('array-unique')
var base_options = require('../base-options')

exports.shorthands = {
  c: 'cwd'
}

exports.options = base_options.extend({
  name: {
    info: 'specify the package to build',
    set: function (name) {
      // neuron build --name a,b
      // {name: ['a', 'b']}
      if (name) {
        name = name.split(',')
          .map(function(n){
            return n.trim()
          })
          .filter(Boolean)
        name = unique(name)

      // neuron build a b
      } else {
        name = unique(this.get('_'))
      }

      if (name.length) {
        return name
      }

      var cwd = this.get('cwd')
      var root = this.get('src')
      var done = this.async()

      // neuron build
      paths.get_names_from_path(cwd, root, done)
    }
  },

  'check-mtime': {
    type: Boolean,
    default: false,
    info: 'check mtime of package folder, if the mtime is in the cache, it will skip buiding.',
    set: function (check) {
      var done = this.async()

      function cb (err) {
{'fraction_non_alphanumeric': 0.15008090614886732, 'fraction_numerical': 0.0, 'mean_word_length': 2.142312579415502, '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': '2053968', 'n_tokens_mistral': 813, 'n_tokens_neox': 794, 'n_words': 227}