Skip to content
This repository has been archived by the owner on May 1, 2020. It is now read-only.

Commit

Permalink
fix(sass): remove broken sass caching
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdbradley authored and danbucholtz committed Nov 9, 2016
1 parent 87f7648 commit 91faf0b
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions src/sass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,15 +226,6 @@ function getComponentDirectories(moduleDirectories: string[], sassConfig: SassCo
function render(context: BuildContext, sassConfig: SassConfig): Promise<string> {
return new Promise((resolve, reject) => {

if (lastRenderKey !== null) {
// if the sass data imports are same, don't bother
const renderKey = getRenderCacheKey(sassConfig);
if (renderKey === lastRenderKey) {
resolve(sassConfig.outFile);
return;
}
}

sassConfig.omitSourceMapUrl = true;

if (sassConfig.sourceMap) {
Expand All @@ -253,7 +244,6 @@ function render(context: BuildContext, sassConfig: SassConfig): Promise<string>
} else {
// sass render success :)
renderSassSuccess(context, sassResult, sassConfig).then(outFile => {
lastRenderKey = getRenderCacheKey(sassConfig);
resolve(outFile);

}).catch(err => {
Expand Down Expand Up @@ -436,17 +426,6 @@ function defaultSortComponentFilesFn(a: any, b: any): number {
}


function getRenderCacheKey(sassConfig: SassConfig) {
return [
sassConfig.data,
sassConfig.file,
].join('|');
}


let lastRenderKey: string = null;


const taskInfo: TaskInfo = {
fullArg: '--sass',
shortArg: '-s',
Expand Down

0 comments on commit 91faf0b

Please sign in to comment.