Skip to content

Commit b31cc70

Browse files
committed
Moving the 'generated by coffeescript version X' comment to the bottom, to get it out of the way
1 parent 78891a0 commit b31cc70

15 files changed

+32
-19
lines changed

lib/coffee-script/browser.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// Generated by CoffeeScript 1.5.0-pre
21
(function() {
32
var CoffeeScript, runScripts;
43

@@ -90,3 +89,5 @@
9089
}
9190

9291
}).call(this);
92+
93+
// Generated by CoffeeScript 1.5.0-pre

lib/coffee-script/cake.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// Generated by CoffeeScript 1.5.0-pre
21
(function() {
32
var CoffeeScript, cakefileDirectory, existsSync, fatalError, fs, helpers, missingTask, oparse, options, optparse, path, printTasks, switches, tasks;
43

@@ -111,3 +110,5 @@
111110
};
112111

113112
}).call(this);
113+
114+
// Generated by CoffeeScript 1.5.0-pre

lib/coffee-script/coffee-script.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// Generated by CoffeeScript 1.5.0-pre
21
(function() {
32
var Lexer, compile, ext, extensions, fs, lexer, loadFile, parser, path, vm, _i, _len,
43
__indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; },
@@ -37,7 +36,7 @@
3736
exports.helpers = require('./helpers');
3837

3938
exports.compile = compile = function(code, options) {
40-
var header, js, merge;
39+
var footer, js, merge;
4140
if (options == null) {
4241
options = {};
4342
}
@@ -53,8 +52,8 @@
5352
}
5453
throw err;
5554
}
56-
header = "Generated by CoffeeScript " + this.VERSION;
57-
return "// " + header + "\n" + js;
55+
footer = "Generated by CoffeeScript " + this.VERSION;
56+
return "" + js + "\n// " + footer + "\n";
5857
};
5958

6059
exports.tokens = function(code, options) {
@@ -168,3 +167,5 @@
168167
parser.yy = require('./nodes');
169168

170169
}).call(this);
170+
171+
// Generated by CoffeeScript 1.5.0-pre

lib/coffee-script/command.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// Generated by CoffeeScript 1.5.0-pre
21
(function() {
32
var BANNER, CoffeeScript, EventEmitter, SWITCHES, coffee_exts, compileJoin, compileOptions, compilePath, compileScript, compileStdio, exec, exists, forkNode, fs, helpers, hidden, joinTimeout, lint, notSources, optionParser, optparse, opts, outputPath, parseOptions, path, printLine, printTokens, printWarn, removeSource, sourceCode, sources, spawn, timeLog, unwatchDir, usage, version, wait, watch, watchDir, watchers, writeJs, _ref,
43
__indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
@@ -492,3 +491,5 @@
492491
};
493492

494493
}).call(this);
494+
495+
// Generated by CoffeeScript 1.5.0-pre

lib/coffee-script/grammar.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// Generated by CoffeeScript 1.5.0-pre
21
(function() {
32
var Parser, alt, alternatives, grammar, name, o, operators, token, tokens, unwrap;
43

@@ -610,3 +609,5 @@
610609
});
611610

612611
}).call(this);
612+
613+
// Generated by CoffeeScript 1.5.0-pre

lib/coffee-script/helpers.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// Generated by CoffeeScript 1.5.0-pre
21
(function() {
32
var extend, flatten, _ref;
43

@@ -86,3 +85,5 @@
8685
};
8786

8887
}).call(this);
88+
89+
// Generated by CoffeeScript 1.5.0-pre

lib/coffee-script/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// Generated by CoffeeScript 1.5.0-pre
21
(function() {
32
var key, val, _ref;
43

@@ -9,3 +8,5 @@
98
}
109

1110
}).call(this);
11+
12+
// Generated by CoffeeScript 1.5.0-pre

lib/coffee-script/lexer.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// Generated by CoffeeScript 1.5.0-pre
21
(function() {
32
var BOM, BOOL, CALLABLE, CODE, COFFEE_ALIASES, COFFEE_ALIAS_MAP, COFFEE_KEYWORDS, COMMENT, COMPARE, COMPOUND_ASSIGN, HEREDOC, HEREDOC_ILLEGAL, HEREDOC_INDENT, HEREGEX, HEREGEX_OMIT, IDENTIFIER, INDEXABLE, INVERSES, JSTOKEN, JS_FORBIDDEN, JS_KEYWORDS, LINE_BREAK, LINE_CONTINUER, LITERATE, LOGIC, Lexer, MATH, MULTILINER, MULTI_DENT, NOT_REGEX, NOT_SPACED_REGEX, NUMBER, OPERATOR, REGEX, RELATION, RESERVED, Rewriter, SHIFT, SIMPLESTR, STRICT_PROSCRIBED, TRAILING_SPACES, UNARY, WHITESPACE, compact, count, key, last, starts, _ref, _ref1,
43
__indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
@@ -816,3 +815,5 @@
816815
LINE_BREAK = ['INDENT', 'OUTDENT', 'TERMINATOR'];
817816

818817
}).call(this);
818+
819+
// Generated by CoffeeScript 1.5.0-pre

lib/coffee-script/nodes.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// Generated by CoffeeScript 1.5.0-pre
21
(function() {
32
var Access, Arr, Assign, Base, Block, Call, Class, Closure, Code, Comment, Existence, Extends, For, IDENTIFIER, IDENTIFIER_STR, IS_STRING, If, In, Index, LEVEL_ACCESS, LEVEL_COND, LEVEL_LIST, LEVEL_OP, LEVEL_PAREN, LEVEL_TOP, Literal, METHOD_DEF, NEGATE, NO, Obj, Op, Param, Parens, RESERVED, Range, Return, SIMPLENUM, STRICT_PROSCRIBED, Scope, Slice, Splat, Switch, TAB, THIS, Throw, Try, UTILITIES, Value, While, YES, compact, del, ends, extend, flatten, last, merge, multident, some, starts, unfoldSoak, utility, _ref, _ref1,
43
__hasProp = {}.hasOwnProperty,
@@ -2990,3 +2989,5 @@
29902989
};
29912990

29922991
}).call(this);
2992+
2993+
// Generated by CoffeeScript 1.5.0-pre

lib/coffee-script/optparse.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// Generated by CoffeeScript 1.5.0-pre
21
(function() {
32
var LONG_FLAG, MULTI_FLAG, OPTIONAL, OptionParser, SHORT_FLAG, buildRule, buildRules, normalizeArguments;
43

@@ -136,3 +135,5 @@
136135
};
137136

138137
}).call(this);
138+
139+
// Generated by CoffeeScript 1.5.0-pre

lib/coffee-script/repl.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// Generated by CoffeeScript 1.5.0-pre
21
(function() {
32
var CoffeeScript, addMultilineHandler, merge, nodeREPL, replDefaults, vm;
43

@@ -102,3 +101,5 @@
102101
};
103102

104103
}).call(this);
104+
105+
// Generated by CoffeeScript 1.5.0-pre

lib/coffee-script/rewriter.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// Generated by CoffeeScript 1.5.0-pre
21
(function() {
32
var BALANCED_PAIRS, EXPRESSION_CLOSE, EXPRESSION_END, EXPRESSION_START, IMPLICIT_BLOCK, IMPLICIT_CALL, IMPLICIT_END, IMPLICIT_FUNC, IMPLICIT_UNSPACED_CALL, INVERSES, LINEBREAKS, SINGLE_CLOSERS, SINGLE_LINERS, left, rite, _i, _len, _ref,
43
__indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; },
@@ -349,3 +348,5 @@
349348
LINEBREAKS = ['TERMINATOR', 'INDENT', 'OUTDENT'];
350349

351350
}).call(this);
351+
352+
// Generated by CoffeeScript 1.5.0-pre

lib/coffee-script/scope.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// Generated by CoffeeScript 1.5.0-pre
21
(function() {
32
var Scope, extend, last, _ref;
43

@@ -144,3 +143,5 @@
144143
})();
145144

146145
}).call(this);
146+
147+
// Generated by CoffeeScript 1.5.0-pre

src/coffee-script.coffee

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ exports.compile = compile = (code, options = {}) ->
4141
catch err
4242
err.message = "In #{options.filename}, #{err.message}" if options.filename
4343
throw err
44-
header = "Generated by CoffeeScript #{@VERSION}"
45-
"// #{header}\n#{js}"
44+
footer = "Generated by CoffeeScript #{@VERSION}"
45+
"#{js}\n// #{footer}\n"
4646

4747
# Tokenize a string of CoffeeScript code, and return the array of tokens.
4848
exports.tokens = (code, options) ->

test/compilation.coffee

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ test "--bare", ->
1515

1616
test "header (#1778)", ->
1717
header = "// Generated by CoffeeScript #{CoffeeScript.VERSION}\n"
18-
eq 0, CoffeeScript.compile('x = y', header: on).indexOf header
18+
ok CoffeeScript.compile('x = y', header: on).indexOf(header) >= 0
1919

2020
test "header is disabled by default", ->
2121
header = "// Generated by CoffeeScript #{CoffeeScript.VERSION}\n"

0 commit comments

Comments
 (0)