Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/rewire.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundlers/webpack/getLoaderTestRegExp.js')
-rw-r--r--lib/bundlers/webpack/getLoaderTestRegExp.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/bundlers/webpack/getLoaderTestRegExp.js b/lib/bundlers/webpack/getLoaderTestRegExp.js
new file mode 100644
index 0000000..40119c2
--- /dev/null
+++ b/lib/bundlers/webpack/getLoaderTestRegExp.js
@@ -0,0 +1,16 @@
+"use strict"; // run code in ES5 strict mode
+
+var pathUtil = require("path"),
+ match,
+ basePath;
+
+
+
+match = __dirname.match(/(.*)[\\\/].+[\\\/]rewire[\\\/]lib[\\\/]/);
+if (match === null) {
+ return (/\.js$/);
+} else {
+ basePath = match[1];
+ basePath.replace(/([\\\/])/g, "\\$1");
+ return new RegExp()
+} \ No newline at end of file