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

Commit e8b98c1

Browse files
committed
feat(sassoptions): expose interfaces without impl
1 parent 33ff1ba commit e8b98c1

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

src/interop/sassOptions.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,22 @@ interface SassOptionsInterface {
2323
*/
2424
isIndentedSyntaxSrc: boolean;
2525

26+
/**
27+
* Property accessor to `sass_option_(get|set)_omit_source_map_url`
28+
*/
29+
omitMapComment: boolean;
30+
31+
/**
32+
* Push include path for compilation.
33+
* @param {string} includePath path to be inlcluded
34+
*/
35+
addIncludePath(includePath: string): void;
36+
/**
37+
* Push include path for plugin.
38+
* @param {string} pluginPath path to be inlcluded
39+
*/
40+
addPluginPath(pluginPath: string): void;
41+
2642
/**
2743
* Release allocated memory with created instance.
2844
*/
@@ -98,7 +114,25 @@ class SassOptions implements SassOptionsInterface {
98114
this.cwrapOptions.option_set_is_indented_syntax_src(this.sassOptionsPtr, isIndented);
99115
}
100116

117+
public get omitMapComment(): boolean {
118+
return !!this.cwrapOptions.option_get_omit_source_map_url(this.sassOptionsPtr);
119+
}
120+
121+
public set omitMapComment(isOmitted: boolean) {
122+
this.cwrapOptions.option_set_omit_source_map_url(this.sassOptionsPtr, isOmitted);
123+
}
124+
125+
public addIncludePath(_includePath: string): void {
126+
//TODO: allocate string, mount path
127+
//this.cwrapOptions.option_push_include_path(this.sassOptionsPtr);
128+
}
129+
130+
public addPluginPath(_pluginPath: string): void {
131+
//this.cwrapOptions.option_push_plugin_path(this.sassOptionsPtr);
132+
}
133+
101134
public dispose(): void {
135+
//TODO: unmount path
102136
this.cwrapCtx.delete_options(this.sassOptionsPtr);
103137
log(`SassOptions: disposed instance`);
104138
}

0 commit comments

Comments
 (0)