Skip to content

britco/sass-index

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sass-index

Given a directory, generates an index.sass file for this directory, and any nested directories.

Example

For directory structure:

SASS_FILES
	foo.sass
	bar.sass

When you run:

require('sass-index')(
	dir: 'SASS_FILES/'
)

Adds a new file at SASS_FILES/index.sass, containing:

@import "./foo"
@import "./bar"

Options:

basedir

Base directory where the SASS files are located.

Default: ./

dir

Directory to generate index of.

Default: ./

extensions

List of extensions you want to analyze.

Default: ['.sass','.scss']

ignore

Paths to ignore in index generation. Accepts glob syntax, like path/**.

Default: []

License

Available under the MIT License.