Permalink
Browse files

simplified main API

  • Loading branch information...
bjouhier committed Apr 3, 2012
1 parent 68e4fc6 commit 8b59d5b45b7b139c45478850c00fc9cbf1de0d77
Showing with 23 additions and 26 deletions.
  1. +1 −1 bin/_coffee
  2. +1 −1 bin/_node
  3. +1 −1 bin/coffee-streamline
  4. +1 −1 bin/node-streamline
  5. +0 −8 lib/compiler/command.js
  6. +1 −1 lib/compiler/compile._js
  7. +0 −3 lib/compiler/index.js
  8. +1 −9 lib/compiler/register.js
  9. +17 −1 lib/index.js
View
@@ -4,4 +4,4 @@ var path = require("path");
var fs = require("fs");
var lib = path.join(path.dirname(fs.realpathSync(__filename)), '../lib');
-require(lib + '/compiler/command').run();
+require(lib).run();
View
@@ -4,4 +4,4 @@ var path = require("path");
var fs = require("fs");
var lib = path.join(path.dirname(fs.realpathSync(__filename)), '../lib');
-require(lib + '/compiler/command').run();
+require(lib).run();
View
@@ -5,4 +5,4 @@ var path = require("path");
var fs = require("fs");
var lib = path.join(path.dirname(fs.realpathSync(__filename)), '../lib');
-require(lib + '/compiler/command').run();
+require(lib).run();
View
@@ -5,4 +5,4 @@ var path = require("path");
var fs = require("fs");
var lib = path.join(path.dirname(fs.realpathSync(__filename)), '../lib');
-require(lib + '/compiler/command').run();
+require(lib).run();
View
@@ -1,11 +1,5 @@
"use strict";
-/// !doc
-///
-/// # streamline/lib/compiler/command
-///
-/// Streamline commmand line analyzer / dispatcher
-///
var compile = require('./compile').compile;
var path = require('path');
var flows = require('../util/flows');
@@ -104,8 +98,6 @@ function _run() {
}
}
-/// * `command.run()`
-/// runs `node-streamline` command line analyzer / dispatcher
exports.run = function() {
try {
_run();
View
@@ -353,7 +353,7 @@ exports.cachedTransformSync = function(content, path, transform, options) {
}
/// * `compile.compile(_, paths, options)`
/// Compiles streamline source files in `paths`.
-/// Generates a `foo.js` file for each `foo_.js` file found in `paths`.
+/// Generates a `foo.js` file for each `foo._js` file found in `paths`.
/// `paths` may be a list of files or a list of directories which
/// will be traversed recursively.
/// `options` is a set of options for the `transform` operation.
View
@@ -1,3 +0,0 @@
-exports.compile = require("./compile").compile
-exports.command = require("./command");
-exports.register = require("./register").register;
View
@@ -29,15 +29,7 @@ var compile = require("./compile");
var underscored = require("./underscored");
var registered = false;
var _options = {};
-/// !doc
-///
-/// # streamline/lib/compiler/register
-///
-/// Streamline `require` handler registration
-///
-/// * `register.register(options)`
-/// Registers `require` handlers for streamline.
-/// `options` is a set of default options passed to the `transform` function.
+
exports.register = function(setoptions) {
if (registered) return;
_options = setoptions || {};
View
@@ -1 +1,17 @@
-module.exports = require("./compiler/index");
+/// !doc
+///
+/// # streamline
+///
+/// Streamline main API
+///
+/// * `compile.compile(_, paths, options)`
+/// Compiles streamline source files in `paths`.
+/// See streamline/lib/compiler/compile doc.
+exports.compile = require("./compiler/compile").compile
+/// * `command.run()`
+/// runs `node-streamline` command line analyzer / dispatcher
+exports.run = require("./compiler/command").run;
+/// * `register.register(options)`
+/// Registers `require` handlers for streamline.
+/// `options` is a set of default options passed to the `transform` function.
+exports.register = require("./compiler/register").register;

0 comments on commit 8b59d5b

Please sign in to comment.