tasks/sass_bootstrapper.js
function generateBootstrapContent(partialsArray, lineDelimiter) {
        var _bootstrapContent   = '',
            _folderGroup        = '';

        partialsArray.forEach(function (partialName) {
            var _sassPath = mainPartialList[partialName].removedRoot,
                _currentRoot = _sassPath.parseRootFolder();

            if (options.useRelativePaths) {
                // if useRelativePaths option is set to true the result file will use paths relative to bootstrap file
                // in this case filterRootPaths option is not used
                _sassPath = Path.relative(Path.dirname(options.bootstrapFile),
                                            mainPartialList[partialName].fileName.toSassFormat());
                // remove file extension
                _sassPath = _sassPath.replace(Path.extname(_sassPath), '');
                // Windows support. Replace backslashes into slashes.
                _sassPath = _sassPath.replace(/\\/g, "/");
            } else {
                _sassPath = _sassPath.toSassFormat();
            }

            // if current root folder has changed, write new root folder
            // as a comment and set new current folder
            if (_folderGroup != _currentRoot) {
                _bootstrapContent += NEW_LINE + '// ' + _currentRoot + NEW_LINE;
                _folderGroup = _currentRoot;
            }
            // append import line
            _bootstrapContent += options.importKeyword + ' "' + _sassPath + '"' + lineDelimiter + NEW_LINE;
        });

        return _bootstrapContent;
    }
function generateBootstrapContent(partialsArray, lineDelimiter) {
        var _bootstrapContent   = '',
            _folderGroup        = '';

        partialsArray.forEach(function (partialName) {
            var _sassPath = mainPartialList[partialName].removedRoot,
                _currentRoot = _sassPath.parseRootFolder();

            if (options.useRelativePaths) {
                // if useRelativePaths option is set to true the result file will use paths relative to bootstrap file
                // in this case filterRootPaths option is not used
                _sassPath = Path.relative(Path.dirname(options.bootstrapFile),
                                            mainPartialList[partialName].fileName.toSassFormat());
                // remove file extension
                _sassPath = _sassPath.replace(Path.extname(_sassPath), '');
                // Windows support. Replace backslashes into slashes.
                _sassPath = _sassPath.replace(/\\/g, "/");
            } else {
                _sassPath = _sassPath.toSassFormat();
            }

            // if current root folder has changed, write new root folder
            // as a comment and set new current folder
            if (_folderGroup != _currentRoot) {
                _bootstrapContent += NEW_LINE + '// ' + _currentRoot + NEW_LINE;
                _folderGroup = _currentRoot;
            }
            // append import line
            _bootstrapContent += options.importKeyword + ' "' + _sassPath + '"' + lineDelimiter + NEW_LINE;
        });

        return _bootstrapContent;
    }
function generateBootstrapContent ( partialsArray , lineDelimiter ) { var _bootstrapContent = '' , _folderGroup = '' ; partialsArray . forEach ( function ( partialName ) { var _sassPath = mainPartialList [ partialName ] . removedRoot , _currentRoot = _sassPath . parseRootFolder ( ) ; if ( options . useRelativePaths ) { // if useRelativePaths option is set to true the result file will use paths relative to bootstrap file // in this case filterRootPaths option is not used _sassPath = Path . relative ( Path . dirname ( options . bootstrapFile ) , mainPartialList [ partialName ] . fileName . toSassFormat ( ) ) ; // remove file extension _sassPath = _sassPath . replace ( Path . extname ( _sassPath ) , '' ) ; // Windows support. Replace backslashes into slashes. _sassPath = _sassPath . replace ( / \\ / g , "/" ) ; } else { _sassPath = _sassPath . toSassFormat ( ) ; } // if current root folder has changed, write new root folder // as a comment and set new current folder if ( _folderGroup != _currentRoot ) { _bootstrapContent += NEW_LINE + '// ' + _currentRoot + NEW_LINE ; _folderGroup = _currentRoot ; } // append import line _bootstrapContent += options . importKeyword + ' "' + _sassPath + '"' + lineDelimiter + NEW_LINE ; } ) ; return _bootstrapContent ; }
Generate content for bootstrap file

@param partialsArray {array} list of partials to import by bootstrap file
@param lineDelimiter {string} symbol at the end of the line
@returns {string} formatted file content
Generate content for bootstrap file