From dccb9bb49cea5ada648b0bcac0ac2ed6976e2150 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20M=C3=A9tais?= Date: Sun, 28 Dec 2014 18:05:10 +0100 Subject: [PATCH] Move phantomas_custom to the phantomas tool directory --- lib/runner.js | 2 +- .../tools/phantomas/custom_modules}/core/scopeYLT/scopeYLT.js | 0 .../custom_modules}/modules/domComplexYLT/domComplexYLT.js | 2 +- .../phantomas/custom_modules}/modules/domQYLT/domQYLT.js | 2 +- .../custom_modules}/modules/eventListYLT/eventListYLT.js | 0 .../tools/phantomas/custom_modules}/modules/jQYLT/jQYLT.js | 2 +- .../phantomas/custom_modules}/modules/jsErrYLT/jsErrYLT.js | 0 .../custom_modules}/modules/jsFileLoadYLT/jsFileLoadYLT.js | 0 .../phantomas/custom_modules}/modules/jsTreeYLT/jsTreeYLT.js | 0 .../phantomas/custom_modules}/modules/keepAlive/keepAlive.js | 0 .../custom_modules}/modules/windowPerfYLT/windowPerfYLT.js | 0 lib/tools/{ => phantomas}/phantomasWrapper.js | 4 ++-- test/core/phantomasWrapperTest.js | 2 +- 13 files changed, 7 insertions(+), 7 deletions(-) rename {phantomas_custom => lib/tools/phantomas/custom_modules}/core/scopeYLT/scopeYLT.js (100%) rename {phantomas_custom => lib/tools/phantomas/custom_modules}/modules/domComplexYLT/domComplexYLT.js (98%) rename {phantomas_custom => lib/tools/phantomas/custom_modules}/modules/domQYLT/domQYLT.js (99%) rename {phantomas_custom => lib/tools/phantomas/custom_modules}/modules/eventListYLT/eventListYLT.js (100%) rename {phantomas_custom => lib/tools/phantomas/custom_modules}/modules/jQYLT/jQYLT.js (99%) rename {phantomas_custom => lib/tools/phantomas/custom_modules}/modules/jsErrYLT/jsErrYLT.js (100%) rename {phantomas_custom => lib/tools/phantomas/custom_modules}/modules/jsFileLoadYLT/jsFileLoadYLT.js (100%) rename {phantomas_custom => lib/tools/phantomas/custom_modules}/modules/jsTreeYLT/jsTreeYLT.js (100%) rename {phantomas_custom => lib/tools/phantomas/custom_modules}/modules/keepAlive/keepAlive.js (100%) rename {phantomas_custom => lib/tools/phantomas/custom_modules}/modules/windowPerfYLT/windowPerfYLT.js (100%) rename lib/tools/{ => phantomas}/phantomasWrapper.js (95%) diff --git a/lib/runner.js b/lib/runner.js index 0cd4dcb..ab6ea6d 100644 --- a/lib/runner.js +++ b/lib/runner.js @@ -1,7 +1,7 @@ var Q = require('q'); var debug = require('debug')('ylt:runner'); -var phantomasWrapper = require('./tools/phantomasWrapper'); +var phantomasWrapper = require('./tools/phantomas/phantomasWrapper'); var jsExecutionTransformer = require('./tools/jsExecutionTransformer'); var rulesChecker = require('./rulesChecker'); var scoreCalculator = require('./scoreCalculator'); diff --git a/phantomas_custom/core/scopeYLT/scopeYLT.js b/lib/tools/phantomas/custom_modules/core/scopeYLT/scopeYLT.js similarity index 100% rename from phantomas_custom/core/scopeYLT/scopeYLT.js rename to lib/tools/phantomas/custom_modules/core/scopeYLT/scopeYLT.js diff --git a/phantomas_custom/modules/domComplexYLT/domComplexYLT.js b/lib/tools/phantomas/custom_modules/modules/domComplexYLT/domComplexYLT.js similarity index 98% rename from phantomas_custom/modules/domComplexYLT/domComplexYLT.js rename to lib/tools/phantomas/custom_modules/modules/domComplexYLT/domComplexYLT.js index a64f3c6..f03bf84 100644 --- a/phantomas_custom/modules/domComplexYLT/domComplexYLT.js +++ b/lib/tools/phantomas/custom_modules/modules/domComplexYLT/domComplexYLT.js @@ -28,7 +28,7 @@ exports.module = function(phantomas) { // duplicated ID (issue #392) phantomas.setMetric('DOMidDuplicated'); // @desc number of duplicated IDs found in DOM - var Collection = require('../../../node_modules/phantomas/lib/collection'), + var Collection = require('../../../../../../node_modules/phantomas/lib/collection'), DOMids = new Collection(); phantomas.on('domId', function(id) { diff --git a/phantomas_custom/modules/domQYLT/domQYLT.js b/lib/tools/phantomas/custom_modules/modules/domQYLT/domQYLT.js similarity index 99% rename from phantomas_custom/modules/domQYLT/domQYLT.js rename to lib/tools/phantomas/custom_modules/modules/domQYLT/domQYLT.js index 8f0e4c9..78260d2 100644 --- a/phantomas_custom/modules/domQYLT/domQYLT.js +++ b/lib/tools/phantomas/custom_modules/modules/domQYLT/domQYLT.js @@ -246,7 +246,7 @@ exports.module = function(phantomas) { // count DOM queries by either ID, tag name, class name and selector query // @see https://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-document-doctype - var Collection = require('../../../node_modules/phantomas/lib/collection'), + var Collection = require('../../../../../../node_modules/phantomas/lib/collection'), DOMqueries = new Collection(); phantomas.on('domQuery', function(type, query, fnName, context) { diff --git a/phantomas_custom/modules/eventListYLT/eventListYLT.js b/lib/tools/phantomas/custom_modules/modules/eventListYLT/eventListYLT.js similarity index 100% rename from phantomas_custom/modules/eventListYLT/eventListYLT.js rename to lib/tools/phantomas/custom_modules/modules/eventListYLT/eventListYLT.js diff --git a/phantomas_custom/modules/jQYLT/jQYLT.js b/lib/tools/phantomas/custom_modules/modules/jQYLT/jQYLT.js similarity index 99% rename from phantomas_custom/modules/jQYLT/jQYLT.js rename to lib/tools/phantomas/custom_modules/modules/jQYLT/jQYLT.js index 149fce0..b1014c3 100644 --- a/phantomas_custom/modules/jQYLT/jQYLT.js +++ b/lib/tools/phantomas/custom_modules/modules/jQYLT/jQYLT.js @@ -298,7 +298,7 @@ exports.module = function(phantomas) { // count Sizzle calls to detect duplicated queries - var Collection = require('../../../node_modules/phantomas/lib/collection'), + var Collection = require('../../../../../../node_modules/phantomas/lib/collection'), sizzleCalls = new Collection(), jQueryLoading = new Collection(); diff --git a/phantomas_custom/modules/jsErrYLT/jsErrYLT.js b/lib/tools/phantomas/custom_modules/modules/jsErrYLT/jsErrYLT.js similarity index 100% rename from phantomas_custom/modules/jsErrYLT/jsErrYLT.js rename to lib/tools/phantomas/custom_modules/modules/jsErrYLT/jsErrYLT.js diff --git a/phantomas_custom/modules/jsFileLoadYLT/jsFileLoadYLT.js b/lib/tools/phantomas/custom_modules/modules/jsFileLoadYLT/jsFileLoadYLT.js similarity index 100% rename from phantomas_custom/modules/jsFileLoadYLT/jsFileLoadYLT.js rename to lib/tools/phantomas/custom_modules/modules/jsFileLoadYLT/jsFileLoadYLT.js diff --git a/phantomas_custom/modules/jsTreeYLT/jsTreeYLT.js b/lib/tools/phantomas/custom_modules/modules/jsTreeYLT/jsTreeYLT.js similarity index 100% rename from phantomas_custom/modules/jsTreeYLT/jsTreeYLT.js rename to lib/tools/phantomas/custom_modules/modules/jsTreeYLT/jsTreeYLT.js diff --git a/phantomas_custom/modules/keepAlive/keepAlive.js b/lib/tools/phantomas/custom_modules/modules/keepAlive/keepAlive.js similarity index 100% rename from phantomas_custom/modules/keepAlive/keepAlive.js rename to lib/tools/phantomas/custom_modules/modules/keepAlive/keepAlive.js diff --git a/phantomas_custom/modules/windowPerfYLT/windowPerfYLT.js b/lib/tools/phantomas/custom_modules/modules/windowPerfYLT/windowPerfYLT.js similarity index 100% rename from phantomas_custom/modules/windowPerfYLT/windowPerfYLT.js rename to lib/tools/phantomas/custom_modules/modules/windowPerfYLT/windowPerfYLT.js diff --git a/lib/tools/phantomasWrapper.js b/lib/tools/phantomas/phantomasWrapper.js similarity index 95% rename from lib/tools/phantomasWrapper.js rename to lib/tools/phantomas/phantomasWrapper.js index 8dbd614..803fb00 100644 --- a/lib/tools/phantomasWrapper.js +++ b/lib/tools/phantomas/phantomasWrapper.js @@ -43,8 +43,8 @@ var PhantomasWrapper = function() { 'windowPerformance' // overriden ].join(','), 'include-dirs': [ - 'phantomas_custom/core', - 'phantomas_custom/modules' + 'lib/tools/phantomas/custom_modules/core', + 'lib/tools/phantomas/custom_modules/modules' ].join(',') }; diff --git a/test/core/phantomasWrapperTest.js b/test/core/phantomasWrapperTest.js index 904915e..62ddd08 100644 --- a/test/core/phantomasWrapperTest.js +++ b/test/core/phantomasWrapperTest.js @@ -1,5 +1,5 @@ var should = require('chai').should(); -var phantomasWrapper = require('../../lib/tools/phantomasWrapper'); +var phantomasWrapper = require('../../lib/tools/phantomas/phantomasWrapper'); describe('phantomasWrapper', function() {