<commit_before>james      = require 'james'
coffee     = require 'james-coffee'
uglify     = require 'james-uglify'
browserify = require 'browserify'
Q          = require 'q'

james.task 'build', ->

  js = james.list('src/**/*.coffee', 'spec/**/*.coffee').map (filename) ->
    james.read(filename)
      .transform(coffee filename: filename)
      .write filename.replace /\.coffee$/, '.js'

  james.wait(js).then ->
    dist = james.read browserify('./src/transparency.js').bundle()

    dist.write                   'dist/transparency.js'
    dist.transform(uglify).write 'dist/transparency.min.js'

# james.task 'watch', ->

#   james.watch 'src/**/*.coffee', -> james.run 'build'

james.task 'watch', ->

  james.watch '*', (e, f) ->
    console.log e, f
    Q.delay(400).done -> throw new Error('foobar')


james.task 'default', ['build']
<commit_msg>update Jamesfile.<commit_after>james      = require 'james'
coffee     = require 'james-coffee'
uglify     = require 'james-uglify'
browserify = require 'browserify'
Q          = require 'q'

james.task 'build', ->

  js = james.list('src/**/*.coffee', 'spec/**/*.coffee').map (filename) ->
    james.read(filename)
      .transform(coffee filename: filename)
      .write filename.replace /\.coffee$/, '.js'

  james.wait(js).then ->
    dist = james.read browserify('./src/transparency.js').bundle()

    dist.write                   'dist/transparency.js'
    dist.transform(uglify).write 'dist/transparency.min.js'

james.task 'watch', ->

  james.watch 'src/**/*.coffee', -> james.run 'build'

james.task 'default', ['build']

{'fraction_non_alphanumeric': 0.1856513530522341, 'fraction_numerical': 0.0018879798615481435, 'mean_word_length': 2.8221153846153846, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 16, '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': '7343047', 'n_tokens_mistral': 582, 'n_tokens_neox': 550, 'n_words': 105}