Skip to content

Commit 19bdd3f

Browse files
committed
fix: postinstall
1 parent 1397438 commit 19bdd3f

3 files changed

Lines changed: 13 additions & 9 deletions

File tree

nativescript-theme-core.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nativescript-theme-core",
3-
"version": "0.0.1",
3+
"version": "0.0.2",
44
"description": "Telerik NativeScript Core Theme",
55
"author": "Telerik <support@telerik.com>",
66
"homepage": "https://www.nativescript.org",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nativescript-theme-core",
3-
"version": "0.0.1",
3+
"version": "0.0.2",
44
"description": "Telerik NativeScript Core Theme",
55
"homepage": "https://www.nativescript.org",
66
"license": "Apache-2.0",

scripts/postinstall.js

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,19 @@ if (hasSCSS) {
7272
* @param dest (string) - Destination folder
7373
*/
7474
function copyFolder(src, dest) {
75+
try {
7576
var files = fs.readdirSync(src);
76-
files.forEach(function(file){
77-
var curPath = src + "/" + file;
78-
if(fs.lstatSync(curPath).isDirectory()) { // check to see if we need to recurse
79-
copyFolder(curPath, dest + "/" + file);
80-
} else { // copy file
81-
copyFile(src, dest, file);
82-
}
77+
files.forEach(function (file) {
78+
var curPath = src + "/" + file;
79+
if (fs.lstatSync(curPath).isDirectory()) { // check to see if we need to recurse
80+
copyFolder(curPath, dest + "/" + file);
81+
} else { // copy file
82+
copyFile(src, dest, file);
83+
}
8384
});
85+
} catch (err) {
86+
console.log('Skipping ' + src + ' copy.');
87+
}
8488
}
8589

8690
/**

0 commit comments

Comments
 (0)