@zohodesk/react-cli 1.0.2-exp.2 → 1.0.2-exp.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -12,6 +12,8 @@ var _ignore = _interopRequireDefault(require("ignore"));
|
|
12
12
|
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
14
14
|
|
15
|
+
const path = require('path');
|
16
|
+
|
15
17
|
let aliasNames = {
|
16
18
|
valueReplacer: 'postcss-value-replacer',
|
17
19
|
selectorReplace: 'postcss-selector-replace-new',
|
@@ -50,14 +52,21 @@ function isFileNameMatchingPattern({
|
|
50
52
|
rootDir
|
51
53
|
}) {
|
52
54
|
const finalPlugins = []; // console.log(rootDir);
|
55
|
+
// const regex = `^(.+?)${rootDir}?\\\\`;
|
56
|
+
|
57
|
+
const newFilename = path.relative(rootDir, filename); //windowsModificationFile(filename).replace(
|
58
|
+
// new RegExp(regex, 'gi'),
|
59
|
+
// ''
|
60
|
+
// );
|
61
|
+
// path.relative('supportapp', 'd:\')
|
53
62
|
|
54
|
-
const regex = `^(.+?)${rootDir}?\\\\`;
|
55
|
-
const newFilename = (0, _windowsModification.windowsModificationFile)(filename).replace(new RegExp(regex, 'gi'), '');
|
56
63
|
Object.keys(filterObject).forEach(key => {
|
57
64
|
plugins.forEach(x => {
|
58
65
|
// console.log(key, x.postcssPlugin);
|
59
66
|
if (aliasNames[key] === x.postcssPlugin) {
|
60
|
-
const ig = (0, _ignore.default)(
|
67
|
+
const ig = (0, _ignore.default)({
|
68
|
+
allowRelativePaths: true
|
69
|
+
}).add(filterObject[key]);
|
61
70
|
|
62
71
|
if (ig.ignores(newFilename)) {
|
63
72
|
// console.log(newFilename);
|
@@ -78,11 +87,17 @@ function isFileNameMatchingPluginPattern({
|
|
78
87
|
rootDir
|
79
88
|
}) {
|
80
89
|
let include = true; // console.log(rootDir);
|
90
|
+
// const regex = `^(.+?)${rootDir}?\\\\`;
|
91
|
+
// console.log(plugin);
|
81
92
|
|
82
|
-
const
|
93
|
+
const newFilename = path.relative(rootDir, filename); // const newFilename = windowsModificationFile(filename).replace(
|
94
|
+
// new RegExp(regex, 'gi'),
|
95
|
+
// ''
|
96
|
+
// );
|
83
97
|
|
84
|
-
const
|
85
|
-
|
98
|
+
const ig = (0, _ignore.default)({
|
99
|
+
allowRelativePaths: true
|
100
|
+
}).add(filterArr);
|
86
101
|
|
87
102
|
if (!ig.ignores(newFilename)) {
|
88
103
|
include = false;
|