Permalink
Browse files

added a sourceURL comment that provides context in certain environments

Also, this is the first rebuild since beta 1, so the comment at the top
has been updated.
  • Loading branch information...
1 parent d39a7cf commit 435f874637a29f47006b534b1b6c905c3ad9cde7 @michaelficarra committed Dec 31, 2012
View
@@ -36,12 +36,12 @@ lib/coffee-script/parser.js: src/grammar.pegjs bootstraps lib/coffee-script
lib/coffee-script/bootstrap/parser.js: src/grammar.pegjs lib/coffee-script/bootstrap
$(PEGJS) <"$<" >"$@"
lib/coffee-script/bootstrap/%.js: src/%.coffee lib/coffee-script/bootstrap
- $(COFFEE) <"$<" >"$@"
+ $(COFFEE) -i "$<" >"$@"
bootstraps: $(BOOTSTRAPS) lib/coffee-script/bootstrap
mv lib/coffee-script/bootstrap/* lib/coffee-script
rmdir lib/coffee-script/bootstrap
lib/coffee-script/%.js: src/%.coffee lib/coffee-script/bootstrap/%.js bootstraps lib/coffee-script
- $(COFFEE) <"$<" >"$(@:%=%.tmp)" && mv "$(@:%=%.tmp)" "$@"
+ $(COFFEE) -i "$<" >"$(@:%=%.tmp)" && mv "$(@:%=%.tmp)" "$@"
CoffeeScriptRedux.js: $(LIB)

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -320,20 +320,29 @@ else
else process.exit 1
# js code gen
- try js = CoffeeScript.js jsAST, compact: options.minify
+ try
+ js = CoffeeScript.js jsAST, compact: options.minify
+ if options.input?
+ js = "#{js}\n//@ sourceURL=#{options.input}"
catch e
console.error (e.stack or e.message)
process.exit 1
# --js
if options.js
- if js?
- console.log js
+ process.exit 1 unless js?
+ console.log js
+ process.exit 0
+
+ # --output
+ else if options.output
+ process.exit 1 unless js?
+ fs.writeFile options.output, js, (err) ->
+ throw err if err?
process.exit 0
- else process.exit 1
# --eval
- if options.eval
+ else if options.eval
runMain input, js, jsAST, inputSource
# choose input source

0 comments on commit 435f874

Please sign in to comment.