 
   grunt.registerTask 'doc', 'Make jsdoc', ()->
     done = this.async
-    sh = require('child_process').exec;
+    sh = require('child_process').exec
+    ;
 
     sh 'java -jar jsdoc-toolkit/jsrun.jar jsdoc-toolkit/app/run.js ja/enchant.js -t=doc/template -d=doc/core/ja'
     sh 'java -jar jsdoc-toolkit/jsrun.jar jsdoc-toolkit/app/run.js enchant.js -t=doc/template -d=doc/core/en'

    sh 'java -jar jsdoc-toolkit/jsrun.jar jsdoc-toolkit/app/run.js enchant.js plugins/*.js -t=doc/template -d=doc/plugins/en'
    sh 'java -jar jsdoc-toolkit/jsrun.jar jsdoc-toolkit/app/run.js de/enchant.js de/plugins/*.js -t=doc/template -d=doc/plugins/de'

  grunt.registerTask 'lang', 'Make lang files.', ()->
    grunt.log.writeln 'processing..'
    done = @async
    fs = require('fs')

    make_repl = (lang) ->
      new RegExp('^[\\*\\s]*\\[lang:' + lang + '\\]\\n([\\s\\S]*?)^[\\*\\s]*\\[\\/lang\\]\\n', 'mg')

    repl_en = make_repl 'en'
    repl_ja = make_repl 'ja'
    repl_de = make_repl 'de'

    (glob.sync "dev/{plugins\/,}*.js").forEach (source)->
      dist_en = source.toString().replace(/dev\//, './')
      dist_ja = source.toString().replace(/dev\//, './ja/')
      dist_de = source.toString().replace(/dev\//, './de/')

      fs.writeFileSync dist_en, (fs.readFileSync source).toString()
        .replace(repl_en, '$1')
        .replace(repl_ja, '')
        .replace(repl_de, '')

      fs.writeFileSync dist_ja, (fs.readFileSync source).toString()
        .replace(repl_en, '')
        .replace(repl_ja, '$1')
        .replace(repl_de, '')

      fs.writeFileSync dist_de, (fs.readFileSync source).toString()
        .replace(repl_en, '')
        .replace(repl_ja, '')
        .replace(repl_de, '$1')

      grunt.log.writeln(source)

          dest: 'dev/enchant.js'
          options:
            banner: """
                                                                        /**
                                                                         * <%= pkg.name %> v<%= pkg.version %>
                                                                         * <%= pkg.homepage %>
                                                                         *
                                                                         * Copyright Ubiquitous Entertainment Inc.
                                                                         * Released under the MIT license.
                                                                         */\n\n
                                                                        """

      uglify:
        dist:
