node_modules/gulp-sass/node_modules/node-sass/src/libsass/src/context.cpp
// Add a new import file to the context
Add a new import file to the context
Add a new import file to the context
std::string Context::add_file(const std::string& file, bool delay)
  {
    using namespace File;
    std::string path(make_canonical_path(file));
    std::string resolved(find_file(path, include_paths));
    if (resolved == "") return resolved;
    if (char* contents = read_file(resolved)) {
      add_source(path, resolved, contents);
      style_sheets[path] = 0;
      if (delay == false) {
        size_t i = queue.size() - 1;
        process_queue_entry(queue[i], i);
      }
      return path;
    }
    return std::string("");
  }
std :: string Context :: add_file ( const std :: string & file , bool delay ) { using namespace File ; std :: string path ( make_canonical_path ( file ) ) ; std :: string resolved ( find_file ( path , include_paths ) ) ; if ( resolved == " " ) return resolved ; if ( char * contents = read_file ( resolved ) ) { add_source ( path , resolved , contents ) ; style_sheets [ path ] = 0 ; if ( delay == false ) { size_t i = queue . size ( ) - 1 ; process_queue_entry ( queue [ i ] , i ) ; } return path ; } return std :: string ( " " ) ; }
Add a new import file to the context
Add a new import file to the context