Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
14 lines (11 sloc) 412 Bytes
#!/usr/bin/env coffee
fs = require 'fs'
files = fs.readdirSync './strategies'
strategies = {}
for filename in files
suffixPos = filename.length - 7
if filename[suffixPos...] == '.coffee'
code = fs.readFileSync('./strategies/'+filename, 'utf-8')
strategies[filename[...suffixPos]] = code
definition = "strategies = "+JSON.stringify(strategies)+'\n'
fs.writeFileSync('web/strategies.js', definition)