Skip to content

Commit 14480e2

Browse files
author
Sergii.Kliuchnyk
committed
fix cli to handle err
1 parent f9de281 commit 14480e2

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

cli.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ var fileJs = app.js,
1919
js = fs.readFileSync(fileJs).toString(),
2020
html = fs.readFileSync(fileHtml).toString();
2121

22-
convert(js, html, function (jsx) {
22+
convert(js, html, function (err, jsx) {
23+
if (err) {
24+
throw err;
25+
}
26+
2327
if (app.type === 'js') {
2428
jsx = react.transform(jsx);
2529
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-st",
3-
"version": "0.6.3",
3+
"version": "0.6.4",
44
"description": "React separate template",
55
"main": "conv.js",
66
"dependencies": {

0 commit comments

Comments
 (0)