2017 © Pedro Peláez
 

library timestamp

Adds n:src and n:href macros which append timestamp as a parameter to path (e.g. main.js?512a45c4)

image

slamecka/timestamp

Adds n:src and n:href macros which append timestamp as a parameter to path (e.g. main.js?512a45c4)

  • Tuesday, February 23, 2016
  • by Slamecka
  • Repository
  • 2 Watchers
  • 5 Stars
  • 56 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 4 % Grown

The README.md

Adds macros n:src and n:href, (*1)

<script n:src="/main.js"></script>
<link n:href="style.css">

to produce code similar to, (*2)

<script src="/main.js?512a45c4"></script>
<link href="style.css?512a45c4">

where 512a45c4 is timestamp which automatically changes when you modify the file (it is filesystem's mtime)., (*3)

Please note that you don't have to & can't use {$basePath} with these macros because every path is constructed as $basePath . '/' . $fileName., (*4)

Install

$ composer require slamecka/timestamp:dev-master

In your config.neon, (*5)

nette:
    latte:
        macros:
            - TimestampMacro

MIT license, (*6)

The Versions

23/02 2016

dev-master

9999999-dev

Adds n:src and n:href macros which append timestamp as a parameter to path (e.g. main.js?512a45c4)

  Sources   Download

public domain

The Requires

 

assets nette