mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-17 11:01:25 -05:00
we don't need relative require's because the paths are set up correctly -- removing the unused runner.coffee script
This commit is contained in:
2
Cakefile
2
Cakefile
@@ -7,7 +7,7 @@ run: (args) ->
|
|||||||
proc.addListener 'error', (err) -> if err then puts err
|
proc.addListener 'error', (err) -> if err then puts err
|
||||||
|
|
||||||
|
|
||||||
task 'build:compiler', 'build the CoffeeScript Compiler source code', ->
|
task 'build', 'build the CoffeeScript language from source', ->
|
||||||
fs.readdir('src').addCallback (files) ->
|
fs.readdir('src').addCallback (files) ->
|
||||||
files: 'src/' + file for file in files when file.match(/\.coffee$/)
|
files: 'src/' + file for file in files when file.match(/\.coffee$/)
|
||||||
run ['-o', 'lib/coffee_script'].concat(files)
|
run ['-o', 'lib/coffee_script'].concat(files)
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
var compiler, lexer, parser, path;
|
var compiler, lexer, parser, path;
|
||||||
// Set up for both the browser and the server.
|
// Set up for both the browser and the server.
|
||||||
if ((typeof process !== "undefined" && process !== null)) {
|
if ((typeof process !== "undefined" && process !== null)) {
|
||||||
process.mixin(require('./nodes'));
|
process.mixin(require('nodes'));
|
||||||
path = require('path');
|
path = require('path');
|
||||||
lexer = new (require('./lexer').Lexer)();
|
lexer = new (require('lexer').Lexer)();
|
||||||
parser = require('./parser').parser;
|
parser = require('parser').parser;
|
||||||
} else {
|
} else {
|
||||||
this.exports = this;
|
this.exports = this;
|
||||||
lexer = new Lexer();
|
lexer = new Lexer();
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
var flags, separator;
|
var flags, separator;
|
||||||
parse_options();
|
parse_options();
|
||||||
if (options.interactive) {
|
if (options.interactive) {
|
||||||
return require('./repl');
|
return require('repl');
|
||||||
}
|
}
|
||||||
if (options.eval) {
|
if (options.eval) {
|
||||||
return puts(coffee.compile(sources[0]));
|
return puts(coffee.compile(sources[0]));
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
(function(){
|
(function(){
|
||||||
var AccessorNode, ArrayNode, AssignNode, CallNode, ClosureNode, CodeNode, CommentNode, ExistenceNode, Expressions, ExtendsNode, ForNode, IDENTIFIER, IfNode, IndexNode, LiteralNode, Node, ObjectNode, OpNode, ParentheticalNode, PushNode, RangeNode, ReturnNode, SliceNode, SplatNode, TAB, TRAILING_WHITESPACE, ThisNode, ThrowNode, TryNode, ValueNode, WhileNode, compact, del, flatten, inherit, merge, statement;
|
var AccessorNode, ArrayNode, AssignNode, CallNode, ClosureNode, CodeNode, CommentNode, ExistenceNode, Expressions, ExtendsNode, ForNode, IDENTIFIER, IfNode, IndexNode, LiteralNode, Node, ObjectNode, OpNode, ParentheticalNode, PushNode, RangeNode, ReturnNode, SliceNode, SplatNode, TAB, TRAILING_WHITESPACE, ThisNode, ThrowNode, TryNode, ValueNode, WhileNode, compact, del, flatten, inherit, merge, statement;
|
||||||
var __hasProp = Object.prototype.hasOwnProperty;
|
var __hasProp = Object.prototype.hasOwnProperty;
|
||||||
(typeof process !== "undefined" && process !== null) ? process.mixin(require('./scope')) : (this.exports = this);
|
(typeof process !== "undefined" && process !== null) ? process.mixin(require('scope')) : (this.exports = this);
|
||||||
// Some helper functions
|
// Some helper functions
|
||||||
// Tabs are two spaces for pretty printing.
|
// Tabs are two spaces for pretty printing.
|
||||||
TAB = ' ';
|
TAB = ' ';
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
var coffee, prompt, quit, readline, run;
|
var coffee, prompt, quit, readline, run;
|
||||||
// A CoffeeScript port/version of the Node.js REPL.
|
// A CoffeeScript port/version of the Node.js REPL.
|
||||||
// Required modules.
|
// Required modules.
|
||||||
coffee = require('./coffee-script');
|
coffee = require('coffee-script');
|
||||||
process.mixin(require('sys'));
|
process.mixin(require('sys'));
|
||||||
// Shortcut variables.
|
// Shortcut variables.
|
||||||
prompt = 'coffee> ';
|
prompt = 'coffee> ';
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
(function(){
|
|
||||||
var coffee, paths;
|
|
||||||
// Quickie script to compile and run all the files given as arguments.
|
|
||||||
process.mixin(require('sys'));
|
|
||||||
coffee = require('./coffee-script');
|
|
||||||
paths = process.ARGV;
|
|
||||||
paths = paths.slice(2, paths.length);
|
|
||||||
paths.length ? coffee.ruby_compile_files(paths, function(js) {
|
|
||||||
return eval(js);
|
|
||||||
}) : require('./repl');
|
|
||||||
})();
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
# Set up for both the browser and the server.
|
# Set up for both the browser and the server.
|
||||||
if process?
|
if process?
|
||||||
process.mixin require './nodes'
|
process.mixin require 'nodes'
|
||||||
path: require 'path'
|
path: require 'path'
|
||||||
lexer: new (require('./lexer').Lexer)()
|
lexer: new (require('lexer').Lexer)()
|
||||||
parser: require('./parser').parser
|
parser: require('parser').parser
|
||||||
else
|
else
|
||||||
this.exports: this
|
this.exports: this
|
||||||
lexer: new Lexer()
|
lexer: new Lexer()
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ option_parser: null
|
|||||||
# The CommandLine handles all of the functionality of the `coffee` utility.
|
# The CommandLine handles all of the functionality of the `coffee` utility.
|
||||||
exports.run: ->
|
exports.run: ->
|
||||||
parse_options()
|
parse_options()
|
||||||
return require './repl' if options.interactive
|
return require 'repl' if options.interactive
|
||||||
return puts coffee.compile sources[0] if options.eval
|
return puts coffee.compile sources[0] if options.eval
|
||||||
usage() unless sources.length
|
usage() unless sources.length
|
||||||
separator: sources.indexOf '--'
|
separator: sources.indexOf '--'
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
if process?
|
if process?
|
||||||
process.mixin require './scope'
|
process.mixin require 'scope'
|
||||||
else
|
else
|
||||||
this.exports: this
|
this.exports: this
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# A CoffeeScript port/version of the Node.js REPL.
|
# A CoffeeScript port/version of the Node.js REPL.
|
||||||
|
|
||||||
# Required modules.
|
# Required modules.
|
||||||
coffee: require './coffee-script'
|
coffee: require 'coffee-script'
|
||||||
process.mixin require 'sys'
|
process.mixin require 'sys'
|
||||||
|
|
||||||
# Shortcut variables.
|
# Shortcut variables.
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
# Quickie script to compile and run all the files given as arguments.
|
|
||||||
|
|
||||||
process.mixin require 'sys'
|
|
||||||
coffee: require './coffee-script'
|
|
||||||
|
|
||||||
paths: process.ARGV
|
|
||||||
paths: paths[2...paths.length]
|
|
||||||
|
|
||||||
if paths.length
|
|
||||||
coffee.ruby_compile_files paths, (js) -> eval(js)
|
|
||||||
else
|
|
||||||
require './repl'
|
|
||||||
Reference in New Issue
Block a user