Skip to content

add conf.remove() and conf.add()? #157

@eivindfjeldstad

Description

@eivindfjeldstad

Having a hook to compile templates while using the new plugin API seems to be very difficult ATM. Would be useful to have some way to add/remove scripts before they touch plugins like commonjs. Maybe something like:

build.each('templates', function (file, conf) {
  conf.remove('templates', file);
  file.contents = jade(file.contents);
  file.filename = 'template.js';
  conf.add('scripts', file);
});

Would you accept a PR?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions