Skip to content
This repository has been archived by the owner on Mar 31, 2020. It is now read-only.

Copy assets files when using mix.version() command #268

Closed
wants to merge 4 commits into from

Commits on Aug 28, 2015

  1. Copy assets files when using mix.version() command

    It's somewhat common to use relative paths in .css files.
    
    Versioning such files with elixir invalidates all relative paths:
    http://stackoverflow.com/questions/27789466/asset-management-maintaining-reference-to-relative-assets-after-concatenation/32223524#32223524
    
    This PR proposes a simple syntax to solve this kind of problem, by allowing users to define an array of paths relative to **/public** as a second (or third) argument, so they'll be copied to **/build** after `version` command executes.
    
    **Usage**
    ```
    mix.version(
        ['css/style.css', 'css/vendor/style.css'], //files to be versioned
        ['fonts', 'css/vendor/icons'] //dependent files/dirs to be copied
    );
    ```
    
    This will also re-copy every dependent files when using `gulp watch`.
    rafaelbeckel committed Aug 28, 2015
    Configuration menu
    Copy the full SHA
    a3d6eda View commit details
    Browse the repository at this point in the history
  2. Cleanup and fix

    rafaelbeckel committed Aug 28, 2015
    Configuration menu
    Copy the full SHA
    a132590 View commit details
    Browse the repository at this point in the history

Commits on Sep 18, 2015

  1. A cleaner and updated version

    There was a refactor from @JeffreyWay in this file on main repository before my PR was accepted.
    
    So, I solved the resulting conflicts and developed a cleaner version of the proposed feature, based on his last commit.
    
    Also, I removed the option for ommiting the second argument. While slightly handy for the end user, the implementation was not nice code.
    rafaelbeckel committed Sep 18, 2015
    Configuration menu
    Copy the full SHA
    9f9ebd9 View commit details
    Browse the repository at this point in the history
  2. Merged updated master branch

    Rafael Beckel committed Sep 18, 2015
    Configuration menu
    Copy the full SHA
    e207fac View commit details
    Browse the repository at this point in the history