 
 toANSI = (s)->
   iconv.encode s, 'cp1251'
+
+dup = (array, debug)->
+  unless debug
+    return array
+  res = []
+  for s in array
+    res.push "#{s}:debug"
+    res.push s
+  res

      fs.unlink dst, ->
      x.ext = '.bat'
      delete x.base
      bat = yml[x.name] or yml[':*']
      fs.writeFile path.format(x), toANSI """
        #{prolog}#{word bat.command}"%~f0" #{word bat.args}#{target}
        #{yml[':epilog']}#{do z.source}

me::apply = (compiler)->
  compiler.plugin "done", (compilation)->
    yml = readYML()
    debug = compilation.compilation.options.debug
    target = yml[":target#{if debug then ':debug' else ''}"]
    prolog = yml[':prolog'].replace '#{homepage}', ini.homepage

    for k, z of compilation.compilation.assets
