Adding custom plugins via config #12

Closed
Shumkov opened this Issue Jun 24, 2014 · 5 comments

2 participants

@Shumkov

Hello again :)

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

@Stanback
ZipfWorks member

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

@Shumkov

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

@Stanback
ZipfWorks 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

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 referenced this issue Jul 3, 2014
Merged

Add own plugins #17

@Stanback
ZipfWorks member

This looks good, simple and flexible

@Stanback Stanback closed this Jul 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment