From 60821bb80b6223ffa7657383faa87fa4098b28d8 Mon Sep 17 00:00:00 2001 From: David Majda Date: Thu, 22 Sep 2016 16:59:47 +0200 Subject: [PATCH] Sort "require" calls by variable names and group them This makes things consistent and reduces thinking about "require" ordering. --- benchmark/index.js | 2 +- benchmark/run | 5 ++--- benchmark/server | 6 +++--- lib/compiler/passes/generate-bytecode.js | 4 ++-- lib/compiler/passes/generate-js.js | 2 +- spec/server | 6 +++--- 6 files changed, 12 insertions(+), 13 deletions(-) diff --git a/benchmark/index.js b/benchmark/index.js index 8ce98a5..c84f449 100644 --- a/benchmark/index.js +++ b/benchmark/index.js @@ -2,8 +2,8 @@ /* eslint-env browser, jquery */ -let benchmarks = require("./benchmarks.js"); let Runner = require("./runner.js"); +let benchmarks = require("./benchmarks.js"); $("#run").click(() => { // Results Table Manipulation diff --git a/benchmark/run b/benchmark/run index 7f3a2e6..272100f 100755 --- a/benchmark/run +++ b/benchmark/run @@ -5,10 +5,9 @@ /* eslint-env node */ /* eslint no-console: 0*/ -let fs = require("fs"); - -let benchmarks = require("./benchmarks.js"); let Runner = require("./runner.js"); +let benchmarks = require("./benchmarks.js"); +let fs = require("fs"); // Results Table Manipulation diff --git a/benchmark/server b/benchmark/server index 236801d..fd2f4a7 100755 --- a/benchmark/server +++ b/benchmark/server @@ -9,11 +9,11 @@ // and the benchmark get passed through Babel & Browserify before they are // served to the browser. +let babelify = require("babelify"); +let browserify = require("browserify"); let express = require("express"); -let logger = require("morgan"); let glob = require("glob"); -let browserify = require("browserify"); -let babelify = require("babelify"); +let logger = require("morgan"); let app = express(); diff --git a/lib/compiler/passes/generate-bytecode.js b/lib/compiler/passes/generate-bytecode.js index 2204049..7bde9de 100644 --- a/lib/compiler/passes/generate-bytecode.js +++ b/lib/compiler/passes/generate-bytecode.js @@ -1,9 +1,9 @@ "use strict"; let asts = require("../asts"); -let visitor = require("../visitor"); -let op = require("../opcodes"); let js = require("../js"); +let op = require("../opcodes"); +let visitor = require("../visitor"); // Generates bytecode. // diff --git a/lib/compiler/passes/generate-js.js b/lib/compiler/passes/generate-js.js index ac502b3..3bd3ebc 100644 --- a/lib/compiler/passes/generate-js.js +++ b/lib/compiler/passes/generate-js.js @@ -1,8 +1,8 @@ "use strict"; let asts = require("../asts"); -let op = require("../opcodes"); let js = require("../js"); +let op = require("../opcodes"); // Generates parser JavaScript code. function generateJS(ast, options) { diff --git a/spec/server b/spec/server index 619d4d8..5035df2 100755 --- a/spec/server +++ b/spec/server @@ -9,11 +9,11 @@ // the specs get passed through Babel & Browserify before they are served to the // browser. +let babelify = require("babelify"); +let browserify = require("browserify"); let express = require("express"); -let logger = require("morgan"); let glob = require("glob"); -let browserify = require("browserify"); -let babelify = require("babelify"); +let logger = require("morgan"); let app = express();