Commit aac339e6 by dotzero

CLI: add --follow option

parent edbf4972
...@@ -496,6 +496,7 @@ Output will be saved with the same name as input Sass file into the current work ...@@ -496,6 +496,7 @@ Output will be saved with the same name as input Sass file into the current work
--source-map-embed Embed sourceMappingUrl as data URI --source-map-embed Embed sourceMappingUrl as data URI
--source-map-root Base path, will be emitted in source-map as is --source-map-root Base path, will be emitted in source-map as is
--include-path Path to look for imported files --include-path Path to look for imported files
--follow Follow symlinked directories
--precision The amount of precision allowed in decimal numbers --precision The amount of precision allowed in decimal numbers
--importer Path to .js file containing custom importer --importer Path to .js file containing custom importer
--functions Path to .js file containing custom functions --functions Path to .js file containing custom functions
......
...@@ -46,6 +46,7 @@ var cli = meow({ ...@@ -46,6 +46,7 @@ var cli = meow({
' --source-map-embed Embed sourceMappingUrl as data URI', ' --source-map-embed Embed sourceMappingUrl as data URI',
' --source-map-root Base path, will be emitted in source-map as is', ' --source-map-root Base path, will be emitted in source-map as is',
' --include-path Path to look for imported files', ' --include-path Path to look for imported files',
' --follow Follow symlinked directories',
' --precision The amount of precision allowed in decimal numbers', ' --precision The amount of precision allowed in decimal numbers',
' --importer Path to .js file containing custom importer', ' --importer Path to .js file containing custom importer',
' --functions Path to .js file containing custom functions', ' --functions Path to .js file containing custom functions',
...@@ -54,6 +55,7 @@ var cli = meow({ ...@@ -54,6 +55,7 @@ var cli = meow({
}, { }, {
boolean: [ boolean: [
'indented-syntax', 'indented-syntax',
'follow',
'omit-source-map-url', 'omit-source-map-url',
'quiet', 'quiet',
'recursive', 'recursive',
...@@ -331,7 +333,7 @@ function renderFile(file, options, emitter) { ...@@ -331,7 +333,7 @@ function renderFile(file, options, emitter) {
*/ */
function renderDir(options, emitter) { function renderDir(options, emitter) {
var globPath = path.resolve(options.directory, globPattern(options)); var globPath = path.resolve(options.directory, globPattern(options));
glob(globPath, { ignore: '**/_*' }, function(err, files) { glob(globPath, { ignore: '**/_*', follow: options.follow }, function(err, files) {
if (err) { if (err) {
return emitter.emit('error', util.format('You do not have permission to access this path: %s.', err.path)); return emitter.emit('error', util.format('You do not have permission to access this path: %s.', err.path));
} else if (!files.length) { } else if (!files.length) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment