@zohodesk/react-cli 1.0.3-exp.3 → 1.0.3-exp.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -106,7 +106,6 @@ function watchHandler(fromPath, toPath) {
106
106
  // strictMode
107
107
 
108
108
  } = data;
109
- const oldCode = rootOriginal.toString();
110
109
  rootOriginal.walkRules(rule => {
111
110
  rule.walkDecls(decl => {
112
111
  decl.value.split(' ').forEach(val => {
@@ -131,24 +130,15 @@ function watchHandler(fromPath, toPath) {
131
130
  return;
132
131
  }
133
132
 
134
- const convertedCode = variableConverter(rootOriginal, variables, settingsObject).toString();
133
+ const convertedCode = variableConverter(rootOriginal, variables, settingsObject).toString(); // if (convertedCode.trim() !== '') {
134
+ // fs.writeFileSync(fromPath, convertedCode);
135
+ // }
136
+ // console.log(convertedCode);
135
137
 
136
- if (convertedCode.trim() !== '') {
137
- fs.writeFileSync(fromPath, convertedCode);
138
- } // console.log(convertedCode);
139
-
140
-
141
- postcss([postcssVariableConvertor(cssVariableOptions)]).process(css, {
142
- from: fromPath,
143
- to: toPath
138
+ postcss([postcssVariableConvertor(cssVariableOptions)]).process(convertedCode, {
139
+ from: undefined
144
140
  }).then(result => {
145
141
  fs.writeFileSync(toPath, result.css);
146
-
147
- if (result.map) {
148
- fs.writeFileSync(`${toPath}.map`, result.map);
149
- }
150
- }).then(() => {
151
- fs.writeFileSync(fromPath, oldCode);
152
142
  }); // console.log(variableOptions);
153
143
  }
154
144
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/react-cli",
3
- "version": "1.0.3-exp.3",
3
+ "version": "1.0.3-exp.4",
4
4
  "description": "A CLI tool for build modern web application and libraries",
5
5
  "scripts": {
6
6
  "init": "node ./lib/utils/init.js",