Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

Commit

Permalink
feat(buildimporter): importer namespace factory
Browse files Browse the repository at this point in the history
  • Loading branch information
kwonoj committed Jul 20, 2018
1 parent c099763 commit f17707d
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/interop/importer.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { SassImportEntry, SassImportEntryInterface } from './importer/sassImportEntry';
import { wrapSassImporter } from './importer/wrapSassImporter';
import { buildInteropUtility } from './interopUtility';

const buildImporter = (
cwrapImporter: ReturnType<typeof wrapSassImporter>,
interop: ReturnType<typeof buildInteropUtility>
) => {
return {
importEntry: {
create: ({ rel, abs, source, sourceMap }: { rel: string; abs: string; source: string; sourceMap: string }) =>
new SassImportEntry(cwrapImporter, interop.str, rel, abs, source, sourceMap) as SassImportEntryInterface
}
};
};

export { buildImporter };

0 comments on commit f17707d

Please sign in to comment.