File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -163,7 +163,10 @@ var ensureDirectory = function (filepath) {
163
163
} ;
164
164
165
165
if ( options . depends ) {
166
- // output the target filename, needs to be specified on the command line (no stdout)
166
+ if ( ! outputbase ) {
167
+ sys . print ( "option --depends requires an output path to be specified" ) ;
168
+ return ;
169
+ }
167
170
sys . print ( outputbase + ": " ) ;
168
171
}
169
172
@@ -184,8 +187,10 @@ var parseLessFile = function (e, data) {
184
187
currentErrorcode = 1 ;
185
188
return ;
186
189
} else if ( options . depends ) {
187
- // todo - loop through the imports
188
- // sys.print(path.resolve(path.dirname(env.parentPath),importname)
190
+ for ( var file in parser . imports . files ) {
191
+ sys . print ( file + " " )
192
+ }
193
+ sys . print ( "\n" ) ;
189
194
} else if ( ! options . lint ) {
190
195
try {
191
196
var css = tree . toCSS ( {
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ var lessc_helper = {
30
30
sys . puts ( "options:" ) ;
31
31
sys . puts ( " -h, --help Print help (this message) and exit." ) ;
32
32
sys . puts ( " --include-path Set include paths. Separated by `:'. Use `;' on Windows." ) ;
33
+ sys . puts ( " -M, --depends Output a makefile import dependency list to stdout" ) ;
33
34
sys . puts ( " --no-color Disable colorized output." ) ;
34
35
sys . puts ( " --no-ie-compat Disable IE compatibility checks." ) ;
35
36
sys . puts ( " -l, --lint Syntax check only (lint)." ) ;
You can’t perform that action at this time.
0 commit comments