nativescript-dev-sass
Advanced tools
Comparing version 0.3.0 to 0.4.0
@@ -0,1 +1,12 @@ | ||
## v0.4.0 | ||
- Added demo project to Git repo | ||
- Merged PR to fix support for empty SCSS files (https://github.com/toddanglin/nativescript-dev-sass/pull/12) | ||
- Merged PR to improve handling of imports under symlink (https://github.com/toddanglin/nativescript-dev-sass/pull/13) | ||
- Merged PR to clean-up/remove SCSS files from generated platform packages (https://github.com/toddanglin/nativescript-dev-sass/pull/9) | ||
## v0.3.0 | ||
- Merged PR to support importing SCSS from node_modules (https://github.com/toddanglin/nativescript-dev-sass/pull/7) | ||
## v0.2.0 | ||
@@ -2,0 +13,0 @@ |
@@ -19,3 +19,3 @@ exports.convert = convert; | ||
var sassFiles = glob.sync(sassFilesPath).filter(function(filePath){ | ||
var sassFiles = glob.sync(sassFilesPath, { follow: true }).filter(function(filePath){ | ||
var path = filePath; | ||
@@ -58,3 +58,11 @@ var parts = path.split('/'); | ||
var cssFilePath = filePath.replace('.scss', '.css'); | ||
if(sassFileContent.trim().length === 0) { | ||
// No SASS content write an empty file | ||
fs.writeFile(cssFilePath, '', 'utf8', function(){ | ||
callback(); | ||
}); | ||
return; | ||
} | ||
sass.render({ | ||
@@ -71,12 +79,13 @@ data: sassFileContent, | ||
if(output === null){ | ||
//No CSS content in converted scss file; No need to write file | ||
if(output && output.css){ | ||
output = output.css; | ||
} else { | ||
output = ''; | ||
} | ||
fs.writeFile(cssFilePath, output, 'utf8', function(){ | ||
//File done writing | ||
callback(); | ||
} else { | ||
fs.writeFile(cssFilePath, output.css, 'utf8', function(){ | ||
//File done writing | ||
callback(); | ||
}); | ||
} | ||
}); | ||
}); | ||
} | ||
} |
{ | ||
"name": "nativescript-dev-sass", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"description": "SASS CSS pre-processor for NativeScript projects.", | ||
@@ -16,2 +16,7 @@ "scripts": { | ||
"inject": true | ||
}, | ||
{ | ||
"type": "after-prepare", | ||
"script": "lib/after-prepare.js", | ||
"inject": true | ||
} | ||
@@ -26,2 +31,3 @@ ] | ||
"dependencies": { | ||
"bluebird": "^3.4.6", | ||
"node-sass": "*", | ||
@@ -28,0 +34,0 @@ "glob": "*", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7251
10
100
4
2
+ Addedbluebird@^3.4.6
+ Addedbluebird@3.7.2(transitive)