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

Plugin execution order is unable to be specified. #344

Open
davemo opened this issue Jan 27, 2015 · 1 comment
Open

Plugin execution order is unable to be specified. #344

davemo opened this issue Jan 27, 2015 · 1 comment

Comments

@davemo
Copy link
Member

davemo commented Jan 27, 2015

In releasing https://github.com/linemanjs/lineman-vendor-split I encountered a bug using the lineman-angular plugin in conjunction with lineman-vendor-split; users are unable to control the execution order of plugins.

The problem manifests itself in a project using lineman-angular due to the fact that the concat_sourcemap config is modified by both plugins yet lineman-angular expects lineman-vendor-split to go first so that the config is setup appropriately to modify.

Discussion with @searls has yielded a couple of options for users being able to define this, the simplest being simply exporting a function from a plugin that is then required in the config/application.{js,coffee} of the users lineman application.

ie:

module.exports = (lineman) ->
    require('lineman-vendor-split')(lineman.application.config) #mutates the config
    # other normal app config here
    server:
      enabled: true
    # etc
@davemo davemo self-assigned this Jan 27, 2015
@searls
Copy link
Member

searls commented Jan 27, 2015

If we want to take a serious look at this, the first step is probably reacquainting ourselves with the code that currently discovers plugins. It may provide a little insight into how ordering works now

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

No branches or pull requests

2 participants