Skip to content

Commit

Permalink
Merge pull request #1683 from ockham/patch-1
Browse files Browse the repository at this point in the history
Sass Transformer: Also look for partials
  • Loading branch information
hypest authored Dec 17, 2019
2 parents 06b924d + 016e684 commit 02dbd1b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion sass-transformer-inside-gb.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ function findVariant( name, extensions, includePaths ) {
// try to find the file iterating through the extensions, in order.
const foundExtention = extensions.find( ( extension ) => {
const fname = includePath + '/' + name + extension;
return fs.existsSync( fname );
const partialfname = includePath + '/_' + name + extension;
return fs.existsSync( fname ) || fs.existsSync( partialfname );
} );

if ( foundExtention ) {
Expand Down
3 changes: 2 additions & 1 deletion sass-transformer.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ function findVariant( name, extensions, includePaths ) {
// try to find the file iterating through the extensions, in order.
const foundExtention = extensions.find( ( extension ) => {
const fname = includePath + '/' + name + extension;
return fs.existsSync( fname );
const partialfname = includePath + '/_' + name + extension;
return fs.existsSync( fname ) || fs.existsSync( partialfname );
} );

if ( foundExtention ) {
Expand Down

0 comments on commit 02dbd1b

Please sign in to comment.