Merge pull request #3477 from davidchambers/deprecate-join

command: deprecate --join
This commit is contained in:
Jeremy Ashkenas
2014-05-12 10:59:17 -04:00
2 changed files with 17 additions and 1 deletions

View File

@@ -86,6 +86,7 @@
}
if (opts.join) {
opts.join = path.resolve(opts.join);
console.error('\nThe --join option is deprecated and will be removed in a future version.\n\nIf for some reason it\'s necessary to share local variables between files,\nreplace...\n\n $ coffee --compile --join bundle.js -- a.coffee b.coffee c.coffee\n\nwith...\n\n $ cat a.coffee b.coffee c.coffee | coffee --compile --stdio > bundle.js\n');
}
_ref1 = opts["arguments"];
_results = [];

View File

@@ -81,7 +81,22 @@ exports.run = ->
process.argv[0] = 'coffee'
opts.output = path.resolve opts.output if opts.output
opts.join = path.resolve opts.join if opts.join
if opts.join
opts.join = path.resolve opts.join
console.error '''
The --join option is deprecated and will be removed in a future version.
If for some reason it's necessary to share local variables between files,
replace...
$ coffee --compile --join bundle.js -- a.coffee b.coffee c.coffee
with...
$ cat a.coffee b.coffee c.coffee | coffee --compile --stdio > bundle.js
'''
for source in opts.arguments
source = path.resolve source
compilePath source, yes, source