File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 1
1
import { src } from 'gulp' ;
2
2
import { join } from 'path' ;
3
+ import { buildConfig } from '../build-config' ;
3
4
4
5
// These imports lack of type definitions.
5
6
const gulpSass = require ( 'gulp-sass' ) ;
6
7
const gulpIf = require ( 'gulp-if' ) ;
7
8
const gulpCleanCss = require ( 'gulp-clean-css' ) ;
8
9
10
+ const sassIncludePaths = [
11
+ join ( buildConfig . projectDir , 'node_modules/' )
12
+ ] ;
13
+
9
14
/** Create a gulp task that builds SCSS files. */
10
15
export function buildScssPipeline ( sourceDir : string , minifyOutput = false ) {
11
16
return src ( join ( sourceDir , '**/*.scss' ) )
12
- . pipe ( gulpSass ( ) . on ( 'error' , gulpSass . logError ) )
17
+ . pipe ( gulpSass ( { includePaths : sassIncludePaths } ) . on ( 'error' , gulpSass . logError ) )
13
18
. pipe ( gulpIf ( minifyOutput , gulpCleanCss ( ) ) ) ;
14
19
}
You can’t perform that action at this time.
0 commit comments