Skip to content

Using collections in development mode #170

Description

@dronchik

I want to combine & minify my assets only in production mode, but in development mode I don't need todo this because it make debugging more complicated. How can I do this?

To allow minifications only in production mode I can remove filters from global.php and add to local.php in production environment and it will work great.

How can I do the same trick with collection resolvers?

Thanks!

Activity

  1. RWOverdijk commented on Apr 14, 2015

    @RWOverdijk
    Owner

    So if I understand this correctly... You want to load all assets individually for development, and combine them in a collection for production?

    If so, that's not really possible right now. You can skip the minify filter using local configs.

    We could create a ViewHelper that adds the assets conditionally based on a config. I'd accept a PR for that.

  2. dronchik commented on Apr 14, 2015

    @dronchik
    Author

    Yes, I want to load all assets individually for development, and combine them in a collection for production. How this ViewHelper will work?

  3. RWOverdijk commented on Apr 14, 2015

    @RWOverdijk
    Owner

    @dronchik The view helper would basically extend the default headScript helper. You'd be able to configure it (local config) and have it add all files in a collection individually. I'm not sure how this would work internally.

  4. dronchik commented on Apr 14, 2015

    @dronchik
    Author

    Sounds good:)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions