Skip to content

helper: file_exist (in sass-extension) #1717

@hiphapis

Description

@hiphapis

hiphapis@009049b

this is not a bug-patch code
But i think, somebody will need this function, just as i did

if you agree with this, i will send you pull-request

ps. I have no idea how to create unit test code
It's because real_path will not work successfully in test mode
Let us know if you have any other ideas

sample

@if file_exist($img) {
  @include replace-text($img);
}
@else {
  @include replace-text($fallback-img);
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions