It sounds to me like you're saying that you have two build scripts? For string.js, I just use a Cakefile to achieve what you I think that you want. Essentially, if the source file changes, it produces a regular JS file and then an uglified file.
Here is the relevant portion of the Cakefile:
task 'watch', 'Watch src/ for changes', ->
browserTestFile = path.join(process.cwd(), 'test_browser', 'string.test.js')
coffee = spawn 'coffee', ['-w', '-c', '-o', 'lib', 'src']
coffee.stderr.on 'data', (data) -> 'ERR: ' + process.stderr.write data.toString()
coffee.stdout.on 'data', (data) ->
d = data.toString()
if d.indexOf('compiled') > 0
#invoke 'test'
fsw = fs.createWriteStream(browserTestFile, flags: 'w', encoding: 'utf8', mode: 0666)
coffee_test = spawn 'coffee', ['-c', '-p', 'test/string.test.coffee']
coffee_test.stdout.pipe(fsw, end: false)
uglify = spawn 'uglifyjs', ['lib/string.js']
uglify.stdout.pipe(fs.createWriteStream('lib/string.min.js'))
else
growl(d, title: 'Error', image: './resources/error.png')
process.stdout.write data.toString()