@@ -10,7 +10,8 @@ import { splitStyles } from '@microsoft/load-themed-styles';
1010import {
1111 FileSystem ,
1212 JsonFile ,
13- LegacyAdapters
13+ LegacyAdapters ,
14+ JsonObject
1415} from '@microsoft/node-core-library' ;
1516import * as glob from 'glob' ;
1617import * as nodeSass from 'node-sass' ;
@@ -89,7 +90,7 @@ export class SassTask extends GulpTask<ISassTaskConfig> {
8990 autoprefixer ( { browsers : [ '> 1%' , 'last 2 versions' , 'ie >= 10' ] } )
9091 ] ;
9192
92- constructor ( ) {
93+ public constructor ( ) {
9394 super (
9495 'sass' ,
9596 {
@@ -107,7 +108,7 @@ export class SassTask extends GulpTask<ISassTaskConfig> {
107108 ) ;
108109 }
109110
110- public loadSchema ( ) : Object {
111+ public loadSchema ( ) : JsonObject {
111112 return JsonFile . load ( path . join ( __dirname , 'sass.schema.json' ) ) ;
112113 }
113114
@@ -182,7 +183,7 @@ export class SassTask extends GulpTask<ISassTaskConfig> {
182183 return postcss ( plugins ) . process ( result . css . toString ( ) , options ) as PromiseLike < postcss . Result > ;
183184 } ) . then ( ( result : postcss . Result ) => {
184185 let cleanCssOptions : CleanCss . Options = { level : 1 , returnPromise : true } ;
185- if ( ! ! this . taskConfig . cleanCssOptions ) {
186+ if ( this . taskConfig . cleanCssOptions ) {
186187 cleanCssOptions = { ...this . taskConfig . cleanCssOptions , returnPromise : true } ;
187188 }
188189 cleanCssOptions . sourceMap = ! ! result . map ;
@@ -221,7 +222,7 @@ export class SassTask extends GulpTask<ISassTaskConfig> {
221222 `require(${ JSON . stringify ( `./${ path . basename ( cssOutputPathAbsolute ) } ` ) } );` ,
222223 stylesExportString
223224 ] ) ;
224- } else if ( ! ! content ) {
225+ } else if ( content ) {
225226 lines = lines . concat ( [
226227 'import { loadStyles } from \'@microsoft/load-themed-styles\';' ,
227228 '' ,
@@ -295,7 +296,7 @@ export class SassTask extends GulpTask<ISassTaskConfig> {
295296
296297 if ( this . taskConfig . moduleExportName === '' ) {
297298 exportString = 'export = styles;' ;
298- } else if ( ! ! this . taskConfig . moduleExportName ) {
299+ } else if ( this . taskConfig . moduleExportName ) {
299300 // exportString = `export const ${this.taskConfig.moduleExportName} = styles;`;
300301 }
301302
0 commit comments