Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Node 0.6.x - removed require.paths, changed sys to util

  • Loading branch information...
commit 477b3e81a840651e226d40745d8a624a90e08bee 1 parent ea22361
@pacovell pacovell authored
View
3  bin/kyuri
@@ -1,7 +1,6 @@
#!/usr/bin/env node
var path = require('path'),
- sys = require('sys'),
fs = require('fs'),
events = require('events');
@@ -14,8 +13,6 @@ var inspect = require('eyes').inspector({
styles: { string: 'grey', regexp: 'grey' }
});
-require.paths.unshift(path.join(__dirname, '..', 'lib'));
-
var kyuri = require('kyuri');
var help = [
View
20 lib/kyuri.js
@@ -6,28 +6,26 @@
*
*/
-require.paths.unshift(__dirname);
-
var kyuri = exports;
//
// Export core methods
//
kyuri.version = '0.1.0';
-kyuri.compile = require('kyuri/core').compile;
-kyuri.parse = require('kyuri/core').parse;
-kyuri.tokens = require('kyuri/core').tokens;
-kyuri.nodes = require('kyuri/core').nodes;
-kyuri.setLanguage = require('kyuri/core').setLanguage;
-kyuri.i18n = require('kyuri/core').i18n;
-kyuri.Steps = require('kyuri/steps');
+kyuri.compile = require('./kyuri/core').compile;
+kyuri.parse = require('./kyuri/core').parse;
+kyuri.tokens = require('./kyuri/core').tokens;
+kyuri.nodes = require('./kyuri/core').nodes;
+kyuri.setLanguage = require('./kyuri/core').setLanguage;
+kyuri.i18n = require('./kyuri/core').i18n;
+kyuri.Steps = require('./kyuri/steps');
//
// Export runners
//
kyuri.runners = {};
-kyuri.runners.vows = require('kyuri/runners/vows');
-kyuri.runners.cucumber = require('kyuri/runners/cucumber');
+kyuri.runners.vows = require('./kyuri/runners/vows');
+kyuri.runners.cucumber = require('./kyuri/runners/cucumber');
//
// Remark we should probably export the runner methods
View
4 lib/kyuri/generator.js
@@ -10,7 +10,7 @@ var _ = require('underscore')._,
fs = require('fs'),
path = require('path'),
eyes = require('eyes'),
- sys = require('sys');
+ util = require('util');
// Configure underscore to work like mustache
_.templateSettings = {
@@ -185,7 +185,7 @@ var StepGenerator = function (ast) {
};
// Make 'StepGenerator' inherit from 'Generator'
-sys.inherits(StepGenerator, Generator);
+util.inherits(StepGenerator, Generator);
exports.Generator = Generator;
exports.StepGenerator = StepGenerator;
View
1  lib/kyuri/lexer.js
@@ -7,7 +7,6 @@
*/
var helpers = require('./helpers'),
- sys = require('sys'),
eyes = require('eyes');
var MULTI_DENT = /^(\t+)(\.)?/,
View
3  lib/kyuri/parser.js
@@ -6,9 +6,6 @@
*
*/
-var sys = require('sys'),
- eyes = require('eyes');
-
//
// Helper method to get the last feature
// (i.e. the current feature we are building the ast for)
View
2  lib/kyuri/runners/cucumber.js
@@ -5,7 +5,7 @@
* MIT LICENSE
*
*/
-var kyuri = require('kyuri'),
+var kyuri = require('../../kyuri'),
fs = require('fs'),
util = require('util'),
colors = require('colors'),
View
4 test/generator-test.js
@@ -6,9 +6,7 @@
*
*/
-require.paths.unshift(require('path').join(__dirname, '..', 'lib'));
-
-var kyuri = require('kyuri'),
+var kyuri = require('../../kyuri'),
fs = require('fs'),
path = require('path'),
vows = require('vows'),
View
4 test/lexer-test.js
@@ -6,9 +6,7 @@
*
*/
-require.paths.unshift(require('path').join(__dirname, '..', 'lib'));
-
-var kyuri = require('kyuri'),
+var kyuri = require('../../kyuri'),
fs = require('fs'),
path = require('path'),
vows = require('vows'),
View
4 test/parser-test.js
@@ -6,9 +6,7 @@
*
*/
-require.paths.unshift(require('path').join(__dirname, '..', 'lib'));
-
-var kyuri = require('kyuri'),
+var kyuri = require('../../kyuri'),
fs = require('fs'),
path = require('path'),
vows = require('vows'),
View
4 test/simple-lexer-test.js
@@ -6,9 +6,7 @@
*
*/
-require.paths.unshift(require('path').join(__dirname, '..', 'lib'));
-
-var kyuri = require('kyuri'),
+var kyuri = require('../../kyuri'),
vows = require('vows'),
assert = require('assert'),
eyes = require('eyes');
View
4 test/step-generator-test.js
@@ -6,9 +6,7 @@
*
*/
-require.paths.unshift(require('path').join(__dirname, '..', 'lib'));
-
-var kyuri = require('kyuri'),
+var kyuri = require('../../kyuri'),
fs = require('fs'),
path = require('path'),
vows = require('vows'),
View
4 test/vows-runner-test.js
@@ -6,9 +6,7 @@
*
*/
-require.paths.unshift(require('path').join(__dirname, '..', 'lib'));
-
-var kyuri = require('kyuri'),
+var kyuri = require('../../kyuri'),
fs = require('fs'),
path = require('path'),
vows = require('vows'),
Please sign in to comment.
Something went wrong with that request. Please try again.