@zohodesk/react-cli 1.0.2-exp.1 → 1.0.2-exp.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -15,12 +15,6 @@ Object.defineProperty(exports, "CleanUpStatsPlugin", {
15
15
  return _CleanupStatsPlugin.default;
16
16
  }
17
17
  });
18
- Object.defineProperty(exports, "ComposeMinificationPlugin", {
19
- enumerable: true,
20
- get: function () {
21
- return _ComposeMinification.default;
22
- }
23
- });
24
18
  Object.defineProperty(exports, "EFCPlugin", {
25
19
  enumerable: true,
26
20
  get: function () {
@@ -136,8 +130,6 @@ var _MinifyPlugin = _interopRequireDefault(require("./MinifyPlugin"));
136
130
 
137
131
  var _ManifestPlugin = _interopRequireDefault(require("./ManifestPlugin"));
138
132
 
139
- var _ComposeMinification = _interopRequireDefault(require("./ComposeMinification"));
140
-
141
133
  var _CleanupStatsPlugin = _interopRequireDefault(require("./CleanupStatsPlugin"));
142
134
 
143
135
  var _EFCPlugin = _interopRequireDefault(require("./EFCPlugin"));
@@ -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)().add(filterObject[key]);
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 regex = `^(.+?)${rootDir}?\\\\`; // console.log(plugin);
93
+ const newFilename = path.relative(rootDir, filename); // const newFilename = windowsModificationFile(filename).replace(
94
+ // new RegExp(regex, 'gi'),
95
+ // ''
96
+ // );
83
97
 
84
- const newFilename = (0, _windowsModification.windowsModificationFile)(filename).replace(new RegExp(regex, 'gi'), '');
85
- const ig = (0, _ignore.default)().add(filterArr);
98
+ const ig = (0, _ignore.default)({
99
+ allowRelativePaths: true
100
+ }).add(filterArr);
86
101
 
87
102
  if (!ig.ignores(newFilename)) {
88
103
  include = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/react-cli",
3
- "version": "1.0.2-exp.1",
3
+ "version": "1.0.2-exp.3",
4
4
  "description": "A CLI tool for build modern web application and libraries",
5
5
  "scripts": {
6
6
  "init": "node ./lib/utils/init.js",