From e35724a03d66bb73dbbec4dc4b12a5170bfe2615 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Markb=C3=A5ge?= Date: Mon, 27 Feb 2017 18:35:05 -0800 Subject: [PATCH] Move webcomponents.js polyfill to mocks (#8993) * Move webcomponents.js polyfill to mocks I'd like to move it out of shared to make it easier to sync this to RN. Since this is only used for testing and a polyfill is essentially a mock. Maybe this makes sense? Rename to camel case to be consistent with providesModule. * Update path to ignore in configs --- .eslintignore | 2 +- gulpfile.js | 5 ----- package.json | 2 +- .../vendor/third_party/WebComponents.js} | 0 4 files changed, 2 insertions(+), 7 deletions(-) rename src/{shared/vendor/third_party/webcomponents.js => __mocks__/vendor/third_party/WebComponents.js} (100%) diff --git a/.eslintignore b/.eslintignore index 40160a0298..2256716533 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,6 +1,6 @@ # We can probably lint these later but not important at this point src/renderers/art -src/shared/vendor +src/__mocks__/vendor # But not in docs/_js/examples/* docs/_js/*.js docs/js/ diff --git a/gulpfile.js b/gulpfile.js index 731c459a95..6229fd7af6 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -39,7 +39,6 @@ var paths = { 'src/ReactVersion.js', 'src/shared/**/*.js', - '!src/shared/vendor/**/*.js', '!src/**/__benchmarks__/**/*.js', '!src/**/__tests__/**/*.js', '!src/**/__mocks__/**/*.js', @@ -57,7 +56,6 @@ var paths = { 'src/ReactVersion.js', 'src/shared/**/*.js', - '!src/shared/vendor/**/*.js', '!src/**/__benchmarks__/**/*.js', '!src/**/__tests__/**/*.js', '!src/**/__mocks__/**/*.js', @@ -71,7 +69,6 @@ var paths = { 'src/ReactVersion.js', 'src/shared/**/*.js', - '!src/shared/vendor/**/*.js', '!src/**/__benchmarks__/**/*.js', '!src/**/__tests__/**/*.js', '!src/**/__mocks__/**/*.js', @@ -85,7 +82,6 @@ var paths = { 'src/ReactVersion.js', 'src/shared/**/*.js', - '!src/shared/vendor/**/*.js', '!src/**/__benchmarks__/**/*.js', '!src/**/__tests__/**/*.js', '!src/**/__mocks__/**/*.js', @@ -99,7 +95,6 @@ var paths = { 'src/ReactVersion.js', 'src/shared/**/*.js', - '!src/shared/vendor/**/*.js', '!src/**/__benchmarks__/**/*.js', '!src/**/__tests__/**/*.js', '!src/**/__mocks__/**/*.js', diff --git a/package.json b/package.json index b7e22fae8f..b549bbb361 100644 --- a/package.json +++ b/package.json @@ -122,7 +122,7 @@ ], "collectCoverageFrom": [ "src/**/*.js", - "!src/shared/vendor/third_party/*.js", + "!src/__mocks__/vendor/third_party/*.js", "!src/test/*.js" ], "timers": "fake" diff --git a/src/shared/vendor/third_party/webcomponents.js b/src/__mocks__/vendor/third_party/WebComponents.js similarity index 100% rename from src/shared/vendor/third_party/webcomponents.js rename to src/__mocks__/vendor/third_party/WebComponents.js