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
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
In releasing https://github.com/linemanjs/lineman-vendor-split I encountered a bug using the
lineman-angular
plugin in conjunction withlineman-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 theconcat_sourcemap
config is modified by both plugins yetlineman-angular
expectslineman-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: