@@ -126,7 +126,7 @@ int compile_stdin(struct Sass_Options* options, char* outfile) {
126126 free (source_string );
127127 perror ("Error reading standard input" );
128128 #ifdef _WIN32
129- exit (ERROR_READ_FAULT ); //
129+ exit (ERROR_READ_FAULT ); //
130130 #else
131131 exit (EX_IOERR ); // input/output error
132132 #endif
@@ -202,22 +202,23 @@ void print_usage(char* argv0) {
202202 int i ;
203203 printf ("Usage: %s [options] [INPUT] [OUTPUT]\n\n" , argv0 );
204204 printf ("Options:\n" );
205- printf (" -s, --stdin Read input from standard input instead of an input file.\n" );
206- printf (" -t, --style NAME Output style. Can be:" );
205+ printf (" -s, --stdin Read input from standard input instead of an input file.\n" );
206+ printf (" -t, --style NAME Output style. Can be:" );
207207 for (i = NUM_STYLE_OPTION_STRINGS - 1 ; i >= 0 ; i -- ) {
208208 printf (" %s" , style_option_strings [i ].style_string );
209209 printf (i == 0 ? ".\n" : "," );
210210 }
211- printf (" -l, --line-numbers Emit comments showing original line numbers.\n" );
211+ printf (" -l, --line-numbers Emit comments showing original line numbers.\n" );
212212 printf (" --line-comments\n" );
213- printf (" -I, --load-path PATH Set Sass import path.\n" );
214- printf (" -P, --plugin-path PATH Set path to autoload plugins.\n" );
215- printf (" -m, --sourcemap[=TYPE] Emit source map (auto or inline).\n" );
216- printf (" -M, --omit-map-comment Omits the source map url comment.\n" );
217- printf (" -p, --precision Set the precision for numbers.\n" );
218- printf (" -a, --sass Treat input as indented syntax.\n" );
219- printf (" -v, --version Display compiled versions.\n" );
220- printf (" -h, --help Display this help message.\n" );
213+ printf (" -I, --load-path PATH Set Sass import path.\n" );
214+ printf (" -P, --plugin-path PATH Set path to autoload plugins.\n" );
215+ printf (" -E, --import-extension EXT Set additional extenions to use when resolving imports.\n" );
216+ printf (" -m, --sourcemap[=TYPE] Emit source map (auto or inline).\n" );
217+ printf (" -M, --omit-map-comment Omits the source map url comment.\n" );
218+ printf (" -p, --precision Set the precision for numbers.\n" );
219+ printf (" -a, --sass Treat input as indented syntax.\n" );
220+ printf (" -v, --version Display compiled versions.\n" );
221+ printf (" -h, --help Display this help message.\n" );
221222 printf ("\n" );
222223}
223224
@@ -228,7 +229,7 @@ void invalid_usage(char* argv0) {
228229 #else
229230 exit (EX_USAGE ); // command line usage error
230231 #endif
231-
232+
232233}
233234
234235int main (int argc , char * * argv ) {
@@ -261,6 +262,7 @@ int main(int argc, char** argv) {
261262 { "load-path" , required_argument , 0 , 'I' },
262263 { "plugin-path" , required_argument , 0 , 'P' },
263264 { "style" , required_argument , 0 , 't' },
265+ { "import-extension" , required_argument , 0 , 'E' },
264266 { "line-numbers" , no_argument , 0 , 'l' },
265267 { "line-comments" , no_argument , 0 , 'l' },
266268 { "sourcemap" , optional_argument , 0 , 'm' },
@@ -271,11 +273,14 @@ int main(int argc, char** argv) {
271273 { "help" , no_argument , 0 , 'h' },
272274 { NULL , 0 , NULL , 0 }
273275 };
274- while ((c = getopt_long (argc , argv , "vhslm:Map:t:I:P:" , long_options , & long_index )) != -1 ) {
276+ while ((c = getopt_long (argc , argv , "vhslm:Map:t:I:P:E: " , long_options , & long_index )) != -1 ) {
275277 switch (c ) {
276278 case 's' :
277279 from_stdin = 1 ;
278280 break ;
281+ case 'E' :
282+ sass_option_push_import_extension (options , optarg );
283+ break ;
279284 case 'I' :
280285 sass_option_push_include_path (options , optarg );
281286 break ;
0 commit comments