Comparing version 0.6.0 to 0.6.1
@@ -126,3 +126,2 @@ "use strict"; | ||
}, | ||
// compress: {}, | ||
}, | ||
@@ -151,3 +150,3 @@ minifyCSS: true, | ||
else { | ||
logger_1.default.error(err.message); | ||
logger_1.default.error(`${chalk_1.default.red(err.message)} (thrown while processing ${chalk_1.default.blueBright(absoluteTemplatePath)})`); | ||
} | ||
@@ -200,15 +199,19 @@ } | ||
const fileContents = filesystem.getFileContents(absoluteFilePath); | ||
const compiledSassSourceFile = { | ||
name: file.name.replace(/(\.scss|\.sass)$/, '.css'), | ||
dirname: file.dirname, | ||
contents: fileContents | ||
? sass_1.default | ||
.renderSync({ | ||
data: fileContents, | ||
includePaths: [absoluteFileDirectoryName], | ||
}) | ||
.css.toString() | ||
: '', | ||
}; | ||
sassStylesCompilationProgress.tick(absoluteFilePath, 'Compiling SASS files:', `${idx + 1}/${sassSourceFiles.length}`); | ||
let compiledSassSourceFile; | ||
try { | ||
compiledSassSourceFile = { | ||
name: file.name.replace(/(\.scss|\.sass)$/, '.css'), | ||
dirname: file.dirname, | ||
contents: fileContents | ||
? sass_1.default.compileString(fileContents, { loadPaths: [absoluteFileDirectoryName] }).css | ||
: '', | ||
}; | ||
} | ||
catch (err) { | ||
if (err instanceof Error) { | ||
logger_1.default.error(`${chalk_1.default.red(err.message)} (thrown while processing ${chalk_1.default.blueBright(absoluteFilePath)})`); | ||
} | ||
process.exit(1); | ||
} | ||
filesystem.createFile(filesystem.joinAndResolvePath(configuration_1.default.getDistributionDirectoryPath(), compiledSassSourceFile.dirname, compiledSassSourceFile.name), compiledSassSourceFile.contents); | ||
@@ -215,0 +218,0 @@ stats.generatedFilesCount++; |
@@ -46,7 +46,7 @@ "use strict"; | ||
/*----------------------------------------------------------------------------- | ||
* Import namespaced globals from /helpers | ||
* Import namespaced globals from `globals` directory | ||
*----------------------------------------------------------------------------*/ | ||
const globalsPath = configuration_1.default.getGlobalsDirectoryPath(); | ||
const globalsFileList = filesystem.scanFiles(globalsPath, true, false, true); | ||
// change nested helpers files names to include its enclosing folder | ||
// change nested globals files names to include its enclosing folder | ||
globalsFileList.forEach((globalsFile) => { | ||
@@ -53,0 +53,0 @@ if (globalsFile.dirname !== globalsPath) { |
@@ -38,3 +38,3 @@ "use strict"; | ||
/*----------------------------------------------------------------------------- | ||
* Import namespaced helpers from /helpers | ||
* Import namespaced helpers from `helpers` directory | ||
*----------------------------------------------------------------------------*/ | ||
@@ -41,0 +41,0 @@ const helpersPath = configuration_1.default.getHelpersDirectoryPath(); |
{ | ||
"name": "symply", | ||
"version": "0.6.0", | ||
"version": "0.6.1", | ||
"description": "A simple static site generator.", | ||
@@ -5,0 +5,0 @@ "author": "Oleg Legun <oleg.legun@gmail.com>", |
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
195409
1626