mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -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:
parent
6446e0004c
commit
5a81fcd42e
11 changed files with 13 additions and 36 deletions
2
Cakefile
2
Cakefile
|
@ -7,7 +7,7 @@ run: (args) ->
|
|||
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) ->
|
||||
files: 'src/' + file for file in files when file.match(/\.coffee$/)
|
||||
run ['-o', 'lib/coffee_script'].concat(files)
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
var compiler, lexer, parser, path;
|
||||
// Set up for both the browser and the server.
|
||||
if ((typeof process !== "undefined" && process !== null)) {
|
||||
process.mixin(require('./nodes'));
|
||||
process.mixin(require('nodes'));
|
||||
path = require('path');
|
||||
lexer = new (require('./lexer').Lexer)();
|
||||
parser = require('./parser').parser;
|
||||
lexer = new (require('lexer').Lexer)();
|
||||
parser = require('parser').parser;
|
||||
} else {
|
||||
this.exports = this;
|
||||
lexer = new Lexer();
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
var flags, separator;
|
||||
parse_options();
|
||||
if (options.interactive) {
|
||||
return require('./repl');
|
||||
return require('repl');
|
||||
}
|
||||
if (options.eval) {
|
||||
return puts(coffee.compile(sources[0]));
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
(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 __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
|
||||
// Tabs are two spaces for pretty printing.
|
||||
TAB = ' ';
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
var coffee, prompt, quit, readline, run;
|
||||
// A CoffeeScript port/version of the Node.js REPL.
|
||||
// Required modules.
|
||||
coffee = require('./coffee-script');
|
||||
coffee = require('coffee-script');
|
||||
process.mixin(require('sys'));
|
||||
// Shortcut variables.
|
||||
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.
|
||||
if process?
|
||||
process.mixin require './nodes'
|
||||
process.mixin require 'nodes'
|
||||
path: require 'path'
|
||||
lexer: new (require('./lexer').Lexer)()
|
||||
parser: require('./parser').parser
|
||||
lexer: new (require('lexer').Lexer)()
|
||||
parser: require('parser').parser
|
||||
else
|
||||
this.exports: this
|
||||
lexer: new Lexer()
|
||||
|
|
|
@ -31,7 +31,7 @@ option_parser: null
|
|||
# The CommandLine handles all of the functionality of the `coffee` utility.
|
||||
exports.run: ->
|
||||
parse_options()
|
||||
return require './repl' if options.interactive
|
||||
return require 'repl' if options.interactive
|
||||
return puts coffee.compile sources[0] if options.eval
|
||||
usage() unless sources.length
|
||||
separator: sources.indexOf '--'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
if process?
|
||||
process.mixin require './scope'
|
||||
process.mixin require 'scope'
|
||||
else
|
||||
this.exports: this
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# A CoffeeScript port/version of the Node.js REPL.
|
||||
|
||||
# Required modules.
|
||||
coffee: require './coffee-script'
|
||||
coffee: require 'coffee-script'
|
||||
process.mixin require 'sys'
|
||||
|
||||
# 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'
|
Loading…
Add table
Reference in a new issue