<commit_before>child_process = require 'child_process'
fs = require 'fs'
path = require 'path'
qs = require 'querystring'
_ = require 'underscore'

{$} = require 'atom'

BuildView = require './build-view'
SaveConfirmView = require './save-confirm-view'

module.exports =
  config:
    monocleHeight:
      type: 'number',
      default: 0.75,
    minimizedHeight:
      type: 'number',
      default: 0.15,
    keepVisible:
      type: 'boolean',
      default: true
    saveOnBuild:
      type: 'boolean',
      default: false

  activate: (state) ->
    # Manually append /usr/local/bin as it may not be set on some systems,
    # and it's common to have node installed here. Keep it at end so it won't
    # accidentially override any other node installation
    process.env.PATH += ':/usr/local/bin'

    @buildView = new BuildView()
    atom.workspaceView.command "build:trigger", => @build()
    atom.workspaceView.command "build:stop", => @stop()

    @buildView.attach() if atom.config.get 'build.keepVisible'

  deactivate: ->
    @child.kill('SIGKILL') if @child
    clearTimeout @finishedTimer

  buildCommand: ->
    @root = atom.project.getPaths()[0]
    if fs.existsSync @root + '/.atom-build.json'
      realAtomBuild = fs.realpathSync @root + '/.atom-build.json'
      delete require.cache[realAtomBuild]
      build = require realAtomBuild<commit_msg>Config: Keep Visible is default false<commit_after>child_process = require 'child_process'
fs = require 'fs'
path = require 'path'
qs = require 'querystring'
_ = require 'underscore'

{$} = require 'atom'

BuildView = require './build-view'
SaveConfirmView = require './save-confirm-view'

module.exports =
  config:
    monocleHeight:
      type: 'number',
      default: 0.75,
    minimizedHeight:
      type: 'number',
      default: 0.15,
    keepVisible:
      type: 'boolean',
      default: false
    saveOnBuild:
      type: 'boolean',
      default: false

  activate: (state) ->
    # Manually append /usr/local/bin as it may not be set on some systems,
    # and it's common to have node installed here. Keep it at end so it won't
    # accidentially override any other node installation
    process.env.PATH += ':/usr/local/bin'

    @buildView = new BuildView()
    atom.workspaceView.command "build:trigger", => @build()
    atom.workspaceView.command "build:stop", => @stop()

    @buildView.attach() if atom.config.get 'build.keepVisible'

  deactivate: ->
    @child.kill('SIGKILL') if @child
    clearTimeout @finishedTimer

  buildCommand: ->
    @root = atom.project.getPaths()[0]
    if fs.existsSync @root + '/.atom-build.json'
      realAtomBuild = fs.realpathSync @root + '/.atom-build.json'
      delete require.cache[realAtomBuild]
      build = require realAtomBuild
{'fraction_non_alphanumeric': 0.1256791017747193, 'fraction_numerical': 0.0050706265845708075, 'mean_word_length': 3.1347305389221556, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '5784151', 'n_tokens_mistral': 878, 'n_tokens_neox': 851, 'n_words': 236}