Skip to content

Instantly share code, notes, and snippets.

@FredKSchott
Last active August 29, 2015 14:05
Show Gist options
  • Save FredKSchott/008af2dc4d16e257312d to your computer and use it in GitHub Desktop.
Save FredKSchott/008af2dc4d16e257312d to your computer and use it in GitHub Desktop.
Getting Files By Type - ShellJS Recipes - http://shelljs-recipes.tumblr.com/
// Useful for passing files & directories as command arguments
var JS_DIRS = ['lib', 'tests'].join(' ');
var JS_FILES = find(['lib', 'tests']).filter(fileType('js')).join(' ');
var JSON_FILES = find(['lib', 'tests']).filter(fileType('json')).join(' ');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment