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

Adding custom plugins via config #12

Closed
shumkov opened this issue Jun 24, 2014 · 5 comments
Closed

Adding custom plugins via config #12

shumkov opened this issue Jun 24, 2014 · 5 comments

Comments

@shumkov
Copy link
Contributor

shumkov commented Jun 24, 2014

Hello again :)

I want to add my plugin to prerender, but current config schema doesn't allow it.

@Stanback
Copy link
Member

Sure, what are you looking to do?
You should be able to add additional plugins to "plugins": [] in the config file.

@shumkov
Copy link
Contributor Author

shumkov commented Jun 25, 2014

Of course, but i can't add my plugin, because you require it from ./plugins path.

@Stanback
Copy link
Member

Makes sense, I can update the code to allow a full system path to a plugin file instead of expecting it to be in ./plugins.

@shumkov
Copy link
Contributor Author

shumkov commented Jun 26, 2014

Full system path in JSON is not easy :). Why you choose JSON format?

JS in more flexible:

  • easy format
  • comments
  • expressions

And you can pass the plugins objects to config:

plugins: [ 
    'removeScriptTags',
    require('./myPlugin')
]

@shumkov shumkov mentioned this issue Jul 3, 2014
@Stanback
Copy link
Member

This looks good, simple and flexible

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

No branches or pull requests

2 participants