Skip to content

Commit

Permalink
Move node CLI programs into bin/ directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
cscott committed Jun 2, 2013
1 parent 8e25b79 commit 23d4650
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 4 additions & 1 deletion repl.js → bin/repl.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#!/usr/bin/env node
// Node shell to run the tokenize/parse/bcompile/binterp pipeline as a
// TurtleScript REPL.
var requirejs = require('requirejs');
var readline = require('readline');

requirejs.config({
nodeRequire: require
nodeRequire: require,
baseUrl: __dirname + '/..'
});

// set up some global context
Expand Down
5 changes: 4 additions & 1 deletion write-rust-bytecode.js → bin/write-rust-bytecode.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#!/usr/bin/env node
// Node CLI to write bytecode for TurtleScript parser, bytecode compiler,
// startup code and standard library, as a Rust module.
var requirejs = require('requirejs');

requirejs.config({
nodeRequire: require
nodeRequire: require,
baseUrl: __dirname + '/..'
});

requirejs.define('timeouts', { setTimeout: null, clearTimeout: null });
Expand Down
5 changes: 4 additions & 1 deletion write-rust-ops.js → bin/write-rust-ops.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#!/usr/bin/env node
// Node CLI to write out the opcode mapping from bytecode-table.js
// as a Rust module.
var requirejs = require('requirejs');

requirejs.config({
nodeRequire: require
nodeRequire: require,
baseUrl: __dirname + '/..'
});

requirejs(['./bytecode-table'], function(bytecode_table) {
Expand Down

0 comments on commit 23d4650

Please sign in to comment.