@@ -39,19 +39,33 @@ interface SassOptionsInterface {
39
39
*/
40
40
sourceMapFile : string ;
41
41
42
+ /**
43
+ * Property accessor to `sass_option_(get|set)_output_path`
44
+ */
45
+ outputPath : string ;
46
+ /**
47
+ * Property accessor to `sass_option_(get|set)_input_path`
48
+ */
49
+ inputPath : string ;
50
+
42
51
/**
43
52
* Push include path for compilation.
53
+ * Accessor to sass_option_push_include_path
54
+ *
44
55
* @param {string } includePath path to be inlcluded
45
56
*/
46
57
addIncludePath ( includePath : string ) : void ;
47
58
/**
48
59
* Push include path for plugin.
60
+ * Accessor to sass_option_push_plugin_path
61
+ *
49
62
* @param {string } pluginPath path to be inlcluded
50
63
*/
51
64
addPluginPath ( pluginPath : string ) : void ;
52
65
53
66
/**
54
67
* Release allocated memory with created instance.
68
+ * Accessor to sass_delete_options
55
69
*/
56
70
dispose ( ) : void ;
57
71
}
@@ -76,8 +90,10 @@ enum OutputStyle {
76
90
class SassOptions implements SassOptionsInterface {
77
91
/**
78
92
* Raw pointer to `struct Sass_Options*`
93
+ * @internal
79
94
*/
80
- private readonly sassOptionsPtr : number ;
95
+ public readonly sassOptionsPtr : number ;
96
+
81
97
/**
82
98
* List of virtual mounted path.
83
99
*/
@@ -160,6 +176,24 @@ class SassOptions implements SassOptionsInterface {
160
176
this . cwrapOptions . option_set_source_map_file ( this . sassOptionsPtr , this . strMethod . alloc ( mapFile ) ) ;
161
177
}
162
178
179
+ public get outputPath ( ) : string {
180
+ const outPathPtr = this . cwrapOptions . option_get_output_path ( this . sassOptionsPtr ) ;
181
+ return this . strMethod . ptrToString ( outPathPtr ) ;
182
+ }
183
+
184
+ public set outputPath ( outPath : string ) {
185
+ this . cwrapOptions . option_set_output_path ( this . sassOptionsPtr , this . strMethod . alloc ( outPath ) ) ;
186
+ }
187
+
188
+ public get inputPath ( ) : string {
189
+ const inputPathPtr = this . cwrapOptions . option_get_input_path ( this . sassOptionsPtr ) ;
190
+ return this . strMethod . ptrToString ( inputPathPtr ) ;
191
+ }
192
+
193
+ public set inputPath ( outPath : string ) {
194
+ this . cwrapOptions . option_set_input_path ( this . sassOptionsPtr , this . strMethod . alloc ( outPath ) ) ;
195
+ }
196
+
163
197
public addIncludePath ( includePath : string ) : void {
164
198
const mounted = this . mount ( includePath ) ;
165
199
this . mountedPath . push ( mounted ) ;
0 commit comments