Skip to content

Instantly share code, notes, and snippets.

@techwraith
Created February 20, 2014 21:38
Show Gist options
  • Save techwraith/9123752 to your computer and use it in GitHub Desktop.
Save techwraith/9123752 to your computer and use it in GitHub Desktop.
var atomify = require('atomify')
, path = require('path')
var opts = {
entry: path.join(__dirname, '..', 'app', 'index.js')
, debug: true
}
var str = ''
var runcount = 0
var run = function () {
atomify.js(opts, function (e, src) {
console.log('ran ' + (runcount++) + ' times')
if (e) console.error('whoops', e)
if (runcount > 1) {
if (str.length == src.length) {
str = src
return run()
}
console.error('different src', src.length, str.length)
} else {
str = src
run()
}
})
}
run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment