CoffeeScript 1.6.1

This commit is contained in:
Jeremy Ashkenas
2013-03-05 11:07:16 +13:00
parent b62a90d54c
commit eef83a9fcb
64 changed files with 125 additions and 103 deletions

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.6.0
// Generated by CoffeeScript 1.6.1
(function() {
var CoffeeScript, runScripts,
__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; };

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.6.0
// Generated by CoffeeScript 1.6.1
(function() {
var CoffeeScript, cakefileDirectory, existsSync, fatalError, fs, helpers, missingTask, oparse, options, optparse, path, printTasks, switches, tasks;

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.6.0
// Generated by CoffeeScript 1.6.1
(function() {
var Lexer, compile, ext, fs, helpers, lexer, loadFile, parser, path, sourcemap, vm, _i, _len, _ref,
__hasProp = {}.hasOwnProperty;
@@ -35,7 +35,7 @@
}
}
exports.VERSION = '1.6.0';
exports.VERSION = '1.6.1';
exports.helpers = helpers;
@@ -47,12 +47,18 @@
merge = exports.helpers.merge;
try {
if (options.sourceMap) {
coffeeFile = path.basename(options.filename);
jsFile = helpers.baseFileName(options.filename) + ".js";
coffeeFile = helpers.baseFileName(options.filename);
jsFile = helpers.baseFileName(options.filename, true) + ".js";
sourceMap = new sourcemap.SourceMap();
}
fragments = (parser.parse(lexer.tokenize(code, options))).compileToFragments(options);
currentLine = 2;
currentLine = 0;
if (options.header) {
currentLine += 1;
}
if (options.sourceMap) {
currentLine += 1;
}
currentColumn = 0;
js = "";
for (_j = 0, _len1 = fragments.length; _j < _len1; _j++) {

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.6.0
// Generated by CoffeeScript 1.6.1
(function() {
var BANNER, CoffeeScript, EventEmitter, SWITCHES, 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;
@@ -374,7 +374,7 @@
if (extension == null) {
extension = ".js";
}
basename = helpers.baseFileName(source);
basename = helpers.baseFileName(source, true);
srcDir = path.dirname(source);
baseDir = base === '.' ? srcDir : srcDir.substring(base.length);
dir = opts.output ? path.join(opts.output, baseDir) : srcDir;
@@ -395,7 +395,7 @@
js = ' ';
}
if (generatedSourceMap) {
js = "//@ sourceMappingURL=" + (path.basename(sourceMapPath)) + "\n" + js;
js = "//@ sourceMappingURL=" + (helpers.baseFileName(sourceMapPath)) + "\n" + js;
}
fs.writeFile(jsPath, js, function(err) {
if (err) {

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.6.0
// Generated by CoffeeScript 1.6.1
(function() {
var Parser, alt, alternatives, grammar, name, o, operators, token, tokens, unwrap;

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.6.0
// Generated by CoffeeScript 1.6.1
(function() {
var buildLocationData, extend, flatten, _ref;
@@ -121,10 +121,16 @@
}
};
exports.baseFileName = function(file) {
exports.baseFileName = function(file, stripExt) {
var parts;
if (stripExt == null) {
stripExt = false;
}
parts = file.split('/');
file = parts[parts.length - 1];
if (!stripExt) {
return file;
}
parts = file.split('.');
parts.pop();
if (parts[parts.length - 1] === 'coffee') {

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.6.0
// Generated by CoffeeScript 1.6.1
(function() {
var key, val, _ref;

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.6.0
// Generated by CoffeeScript 1.6.1
(function() {
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, locationDataToString, starts, _ref, _ref1,
__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; };

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.6.0
// Generated by CoffeeScript 1.6.1
(function() {
var Access, Arr, Assign, Base, Block, Call, Class, Closure, Code, CodeFragment, 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, addLocationDataFn, compact, del, ends, extend, flatten, fragmentsToText, last, locationDataToString, merge, multident, some, starts, unfoldSoak, utility, _ref, _ref1,
__hasProp = {}.hasOwnProperty,

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.6.0
// Generated by CoffeeScript 1.6.1
(function() {
var LONG_FLAG, MULTI_FLAG, OPTIONAL, OptionParser, SHORT_FLAG, buildRule, buildRules, normalizeArguments;

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.6.0
// Generated by CoffeeScript 1.6.1
(function() {
var CoffeeScript, addMultilineHandler, merge, nodeREPL, replDefaults, vm;

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.6.0
// Generated by CoffeeScript 1.6.1
(function() {
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, generate, left, rite, _i, _len, _ref,
__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; },

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.6.0
// Generated by CoffeeScript 1.6.1
(function() {
var Scope, extend, last, _ref;

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.6.0
// Generated by CoffeeScript 1.6.1
(function() {
var BASE64_CHARS, LineMapping, MAX_BASE64_VALUE, VLQ_CONTINUATION_BIT, VLQ_SHIFT, VLQ_VALUE_MASK, decodeBase64Char, encodeBase64Char;