coffeescript
Advanced tools
Comparing version 1.6.0 to 1.6.1
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.6.0 | ||
// Generated by CoffeeScript 1.6.1 | ||
(function() { | ||
@@ -3,0 +3,0 @@ var CoffeeScript, runScripts, |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.6.0 | ||
// Generated by CoffeeScript 1.6.1 | ||
(function() { | ||
@@ -3,0 +3,0 @@ var CoffeeScript, cakefileDirectory, existsSync, fatalError, fs, helpers, missingTask, oparse, options, optparse, path, printTasks, switches, tasks; |
@@ -1,4 +0,4 @@ | ||
// Generated by CoffeeScript 1.6.0 | ||
// Generated by CoffeeScript 1.6.1 | ||
(function() { | ||
var Lexer, baseFileName, compile, ext, fs, helpers, lexer, loadFile, parser, path, sourcemap, vm, _i, _len, _ref, | ||
var Lexer, compile, ext, fs, helpers, lexer, loadFile, parser, path, sourcemap, vm, _i, _len, _ref, | ||
__hasProp = {}.hasOwnProperty; | ||
@@ -38,12 +38,6 @@ | ||
exports.VERSION = '1.6.0'; | ||
exports.VERSION = '1.6.1'; | ||
exports.helpers = require('./helpers'); | ||
exports.helpers = helpers; | ||
baseFileName = function(fileName) { | ||
var extension; | ||
extension = path.extname(fileName); | ||
return path.basename(fileName, extension); | ||
}; | ||
exports.compile = compile = function(code, options) { | ||
@@ -57,4 +51,4 @@ var answer, coffeeFile, currentColumn, currentLine, fragment, fragments, header, js, jsFile, merge, newLines, sourceMap, _j, _len1; | ||
if (options.sourceMap) { | ||
coffeeFile = path.basename(options.filename); | ||
jsFile = baseFileName(options.filename) + ".js"; | ||
coffeeFile = helpers.baseFileName(options.filename); | ||
jsFile = helpers.baseFileName(options.filename, true) + ".js"; | ||
sourceMap = new sourcemap.SourceMap(); | ||
@@ -64,2 +58,8 @@ } | ||
currentLine = 0; | ||
if (options.header) { | ||
currentLine += 1; | ||
} | ||
if (options.sourceMap) { | ||
currentLine += 1; | ||
} | ||
currentColumn = 0; | ||
@@ -91,3 +91,3 @@ js = ""; | ||
} | ||
if (options.sourceMap || options.returnObject) { | ||
if (options.sourceMap) { | ||
answer = { | ||
@@ -94,0 +94,0 @@ js: js |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.6.0 | ||
// Generated by CoffeeScript 1.6.1 | ||
(function() { | ||
@@ -172,4 +172,7 @@ 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; | ||
compiled = CoffeeScript.compile(t.input, t.options); | ||
t.output = compiled.js; | ||
t.sourceMap = compiled.v3SourceMap; | ||
t.output = compiled; | ||
if (o.map) { | ||
t.output = compiled.js; | ||
t.sourceMap = compiled.v3SourceMap; | ||
} | ||
CoffeeScript.emit('success', task); | ||
@@ -371,7 +374,7 @@ if (o.print) { | ||
outputPath = function(source, base, extension) { | ||
var baseDir, basename, dir, srcDir, _ref1; | ||
var baseDir, basename, dir, srcDir; | ||
if (extension == null) { | ||
extension = ".js"; | ||
} | ||
basename = path.basename(source, ((_ref1 = source.match(/\.((lit)?coffee|coffee\.md)$/)) != null ? _ref1[0] : void 0) || path.extname(source)); | ||
basename = helpers.baseFileName(source, true); | ||
srcDir = path.dirname(source); | ||
@@ -397,3 +400,3 @@ baseDir = base === '.' ? srcDir : srcDir.substring(base.length); | ||
if (generatedSourceMap) { | ||
js = "//@ sourceMappingURL=" + (path.basename(sourceMapPath)) + "\n" + js; | ||
js = "//@ sourceMappingURL=" + (helpers.baseFileName(sourceMapPath)) + "\n" + js; | ||
} | ||
@@ -482,4 +485,3 @@ fs.writeFile(jsPath, js, function(err) { | ||
header: opts.compile, | ||
sourceMap: opts.map, | ||
returnObject: true | ||
sourceMap: opts.map | ||
}; | ||
@@ -486,0 +488,0 @@ }; |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.6.0 | ||
// Generated by CoffeeScript 1.6.1 | ||
(function() { | ||
@@ -3,0 +3,0 @@ var Parser, alt, alternatives, grammar, name, o, operators, token, tokens, unwrap; |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.6.0 | ||
// Generated by CoffeeScript 1.6.1 | ||
(function() { | ||
@@ -124,2 +124,20 @@ var buildLocationData, extend, flatten, _ref; | ||
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') { | ||
parts.pop(); | ||
} | ||
return parts.join('.'); | ||
}; | ||
exports.isCoffee = function(file) { | ||
@@ -126,0 +144,0 @@ return /\.((lit)?coffee|coffee\.md)$/.test(file); |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.6.0 | ||
// Generated by CoffeeScript 1.6.1 | ||
(function() { | ||
@@ -3,0 +3,0 @@ var key, val, _ref; |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.6.0 | ||
// Generated by CoffeeScript 1.6.1 | ||
(function() { | ||
@@ -3,0 +3,0 @@ 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, |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.6.0 | ||
// Generated by CoffeeScript 1.6.1 | ||
(function() { | ||
@@ -3,0 +3,0 @@ var LONG_FLAG, MULTI_FLAG, OPTIONAL, OptionParser, SHORT_FLAG, buildRule, buildRules, normalizeArguments; |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.6.0 | ||
// Generated by CoffeeScript 1.6.1 | ||
(function() { | ||
@@ -3,0 +3,0 @@ var CoffeeScript, addMultilineHandler, merge, nodeREPL, replDefaults, vm; |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.6.0 | ||
// Generated by CoffeeScript 1.6.1 | ||
(function() { | ||
@@ -3,0 +3,0 @@ 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, |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.6.0 | ||
// Generated by CoffeeScript 1.6.1 | ||
(function() { | ||
@@ -3,0 +3,0 @@ var Scope, extend, last, _ref; |
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.6.0 | ||
// Generated by CoffeeScript 1.6.1 | ||
(function() { | ||
@@ -3,0 +3,0 @@ var BASE64_CHARS, LineMapping, MAX_BASE64_VALUE, VLQ_CONTINUATION_BIT, VLQ_SHIFT, VLQ_VALUE_MASK, decodeBase64Char, encodeBase64Char; |
@@ -6,3 +6,3 @@ { | ||
"author": "Jeremy Ashkenas", | ||
"version": "1.6.0", | ||
"version": "1.6.1", | ||
"licenses": [{ | ||
@@ -9,0 +9,0 @@ "type": "MIT", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
346481
7102