X Tutup
coffee = require 'coffee-script' fs = require 'fs' nodePath = require 'path' srcPath = './src/koding-bound' libPath = './lib/koding-bound' task 'build', ({buildForBrowser})-> fs.readdirSync(srcPath).forEach (file)-> return unless /\.coffee$/.test file src = fs.readFileSync nodePath.join(srcPath, file), 'utf-8' js = coffee.compile src, bare: yes jsFile = nodePath.join(libPath, file.replace /coffee$/, 'js') fs.writeFileSync jsFile, js, 'utf-8' payload = require('browserify')('./index.js').bundle() fs.writeFileSync nodePath.join('./browser','koding-bound.js'), payload, 'utf-8'
X Tutup