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

Commit

Permalink
feat(sassoptions): expose interfaces without impl
Browse files Browse the repository at this point in the history
  • Loading branch information
kwonoj committed Jul 11, 2018
1 parent 33ff1ba commit e8b98c1
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions src/interop/sassOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,22 @@ interface SassOptionsInterface {
*/
isIndentedSyntaxSrc: boolean;

/**
* Property accessor to `sass_option_(get|set)_omit_source_map_url`
*/
omitMapComment: boolean;

/**
* Push include path for compilation.
* @param {string} includePath path to be inlcluded
*/
addIncludePath(includePath: string): void;
/**
* Push include path for plugin.
* @param {string} pluginPath path to be inlcluded
*/
addPluginPath(pluginPath: string): void;

/**
* Release allocated memory with created instance.
*/
Expand Down Expand Up @@ -98,7 +114,25 @@ class SassOptions implements SassOptionsInterface {
this.cwrapOptions.option_set_is_indented_syntax_src(this.sassOptionsPtr, isIndented);
}

public get omitMapComment(): boolean {
return !!this.cwrapOptions.option_get_omit_source_map_url(this.sassOptionsPtr);
}

public set omitMapComment(isOmitted: boolean) {
this.cwrapOptions.option_set_omit_source_map_url(this.sassOptionsPtr, isOmitted);
}

public addIncludePath(_includePath: string): void {
//TODO: allocate string, mount path
//this.cwrapOptions.option_push_include_path(this.sassOptionsPtr);
}

public addPluginPath(_pluginPath: string): void {
//this.cwrapOptions.option_push_plugin_path(this.sassOptionsPtr);
}

public dispose(): void {
//TODO: unmount path
this.cwrapCtx.delete_options(this.sassOptionsPtr);
log(`SassOptions: disposed instance`);
}
Expand Down

0 comments on commit e8b98c1

Please sign in to comment.