Skip to content
This repository has been archived by the owner on Oct 13, 2018. It is now read-only.

Do not load hidden folders #34

Open
LostKobrakai opened this issue Mar 4, 2016 · 0 comments
Open

Do not load hidden folders #34

LostKobrakai opened this issue Mar 4, 2016 · 0 comments

Comments

@LostKobrakai
Copy link

I'm using netatalk for network sharing with mac osx and this does add a .AppleDouble folder to each folder inside the shared path. The browser-sync-ui module does try to load this folder as file here

I've solved this by adding a line to exclude all "files" which start with a dot, but I'm not sure if this is really the correct way to fix this issue.

function createInlineTemplates (hooks) {
    return hooks.reduce(function (combined, item) {
        return combined + item.reduce(function (all, filepath) {
            if(path.basename(filepath).substr(0, 1) == '.') return null;
            return all + angularWrap(
                path.basename(filepath),
                fs.readFileSync(filepath));
        }, "");
    }, "");
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant