Skip to content

Commit af33e2e

Browse files
crisbetojelbourn
authored andcommitted
build: fix invalid sass paths being resolved (#2169)
Prevents SASS from resolving certain paths, even though they're invalid. This should prevent issues like #2133 from happening again.
1 parent ea41f29 commit af33e2e

File tree

4 files changed

+5
-9
lines changed

4 files changed

+5
-9
lines changed

tools/gulp/task_helpers.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,11 @@ export function tsBuildTask(tsConfigPath: string, tsConfigName = 'tsconfig.json'
6767

6868

6969
/** Create a SASS Build Task. */
70-
export function sassBuildTask(dest: string, root: string, includePaths: string[]) {
71-
const sassOptions = { includePaths };
72-
70+
export function sassBuildTask(dest: string, root: string) {
7371
return () => {
7472
return gulp.src(_globify(root, '**/*.scss'))
7573
.pipe(gulpSourcemaps.init())
76-
.pipe(gulpSass(sassOptions).on('error', gulpSass.logError))
74+
.pipe(gulpSass().on('error', gulpSass.logError))
7775
.pipe(gulpAutoprefixer(SASS_AUTOPREFIXER_OPTIONS))
7876
.pipe(gulpSourcemaps.write('.'))
7977
.pipe(gulp.dest(dest));

tools/gulp/tasks/components.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,7 @@ task(':build:components:assets', copyTask([
5252
], DIST_COMPONENTS_ROOT));
5353

5454
/** Builds scss into css. */
55-
task(':build:components:scss', sassBuildTask(
56-
DIST_COMPONENTS_ROOT, componentsDir, [path.join(componentsDir, 'core/style')]
57-
));
55+
task(':build:components:scss', sassBuildTask(DIST_COMPONENTS_ROOT, componentsDir));
5856

5957
/** Builds the UMD bundle for all of Angular Material. */
6058
task(':build:components:rollup', [':build:components:inline'], () => {

tools/gulp/tasks/development.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ task(':watch:devapp', () => {
2525

2626
task(':build:devapp:vendor', vendorTask());
2727
task(':build:devapp:ts', [':build:components:rollup'], tsBuildTask(appDir));
28-
task(':build:devapp:scss', [':build:components:scss'], sassBuildTask(outDir, appDir, []));
28+
task(':build:devapp:scss', [':build:components:scss'], sassBuildTask(outDir, appDir));
2929
task(':build:devapp:assets', copyTask(appDir, outDir));
3030
task('build:devapp', buildAppTask('devapp'));
3131

tools/gulp/tasks/e2e.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ task(':build:e2eapp:vendor', vendorTask());
2828
task(':build:e2eapp:ts', [':build:components:ts'], tsBuildTask(appDir));
2929

3030
/** No-op (needed by buildAppTask). */
31-
task(':build:e2eapp:scss', [':build:components:scss'], sassBuildTask(outDir, appDir, []));
31+
task(':build:e2eapp:scss', [':build:components:scss'], sassBuildTask(outDir, appDir));
3232

3333
/** Copies e2e app assets (html, css) to build output. */
3434
task(':build:e2eapp:assets', copyTask(appDir, outDir));

0 commit comments

Comments
 (0)