Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-file and meta improvements #50

Merged
merged 5 commits into from
Jul 5, 2017
Merged

Multi-file and meta improvements #50

merged 5 commits into from
Jul 5, 2017

Conversation

dwightjack
Copy link
Contributor

Hi,

I love this plugin, so I added a couple more features and updated tests:

dest as function

dest param can be a function accepting opts and pluginOpts params. This allows gulp users to generate mutliple styleguides from each file in the stream:

dest(opts, pluginOpts) {
    if (pluginOpts.from) {
        const filename = path.basename(pluginOpts.from, '.css');
        return `styleguides/${filename}.html`;
    }
    return 'styleguides/index.html'
}

Allow custom meta

All parsed meta are stored in a new meta property in every map object. Also if there's a @id meta it will be used as meta.link.id value.

In the markdown source metas are removed.

@sndrgb
Copy link

sndrgb commented Jul 5, 2017

Sounds good! seems very useful

@matype
Copy link
Owner

matype commented Jul 5, 2017

@dwightjack I apologize for my late reply. Thank you for your PR. Great job! 👍

@matype matype merged commit 736904c into matype:master Jul 5, 2017
@matype
Copy link
Owner

matype commented Jul 5, 2017

just released v0.14.0.

@dwightjack
Copy link
Contributor Author

@morishitter No problem. Thank you very much for your work! I really enjoy this plugin. Really simple to setup :)

I've made some more changes but they're missing tests and performance checks.

Will push another PR as soon as they're stable :)

@matype
Copy link
Owner

matype commented Jul 5, 2017

@dwightjack I'm looking forward to using it :) Thanks for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants