Skip to content

Commit 9ade944

Browse files
committed
Minor refactor.
1 parent cae58b5 commit 9ade944

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

core-build/gulp-core-build-sass/src/SassTask.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ export class SassTask extends GulpTask<ISassTaskConfig> {
160160
nodeSass.render,
161161
{
162162
file: filePath,
163-
importer: (url: string) => ({ file: _patchSassUrl(url) }),
163+
importer: (url: string) => ({ file: this._patchSassUrl(url) }),
164164
sourceMap: this.taskConfig.dropCssFiles,
165165
sourceMapContents: true,
166166
omitSourceMapUrl: true,
@@ -307,14 +307,14 @@ export class SassTask extends GulpTask<ISassTaskConfig> {
307307
return Object.keys(result);
308308
});
309309
}
310-
}
311310

312-
function _patchSassUrl(url: string): string {
313-
if (url[0] === '~') {
314-
url = 'node_modules/' + url.substr(1);
315-
} else if (url === 'stdin') {
316-
url = '';
317-
}
311+
private _patchSassUrl(url: string): string {
312+
if (url[0] === '~') {
313+
url = 'node_modules/' + url.substr(1);
314+
} else if (url === 'stdin') {
315+
url = '';
316+
}
318317

319-
return url;
318+
return url;
319+
}
320320
}

0 commit comments

Comments
 (0)