From 00abe297dfd27425014b51ccd47c9d92c606f4ea Mon Sep 17 00:00:00 2001 From: Leo Horie Date: Wed, 26 Oct 2016 15:23:19 -0400 Subject: [PATCH] change line endings, step 1 --- .gitattributes | 1 + bundler/bin/bundle | 3 --- ospec/bin/ospec | 46 ---------------------------------------------- 3 files changed, 1 insertion(+), 49 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..21256661 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto \ No newline at end of file diff --git a/bundler/bin/bundle b/bundler/bin/bundle index e0c4279a..e69de29b 100644 --- a/bundler/bin/bundle +++ b/bundler/bin/bundle @@ -1,3 +0,0 @@ -#!/usr/bin/env node - -require("../cli") diff --git a/ospec/bin/ospec b/ospec/bin/ospec index 49b3ddc0..e69de29b 100644 --- a/ospec/bin/ospec +++ b/ospec/bin/ospec @@ -1,46 +0,0 @@ -#!/usr/bin/env node - -var fs = require("fs") -var path = require("path") - -var o = require("../ospec") - -function traverseDirectory(pathname, callback) { - pathname = pathname.replace(/\\/g, "/") - return new Promise(function(resolve, reject) { - fs.lstat(pathname, function(err, stat) { - if (err) reject(err) - if (stat.isDirectory()) { - fs.readdir(pathname, function(err, pathnames) { - if (err) reject(err) - var promises = [] - for (var i = 0; i < pathnames.length; i++) { - pathnames[i] = path.join(pathname, pathnames[i]) - promises.push(traverseDirectory(pathnames[i], callback)) - } - callback(pathname, stat, pathnames) - resolve(Promise.all(promises)) - }) - } - else { - callback(pathname, stat) - resolve(pathname) - } - }) - }) -} - -traverseDirectory(".", function(pathname, stat, children) { - if (pathname.indexOf("node_modules") > -1) return - if (pathname.match(/(?:^|\/)tests\/.*\.js$/)) { - require(path.normalize(process.cwd()) + "/" + pathname) - } -}) -.then(o.run) -.catch(function(e) { - console.log(e.stack) -}) - -process.on("unhandledRejection", function(e) { - console.log("Uncaught (in promise) " + e.stack) -})