dev-master
9999999-devAdds n:src and n:href macros which append timestamp as a parameter to path (e.g. main.js?512a45c4)
public domain
The Requires
- php >=5.3.0
- nette/nette 2.*
assets nette
Wallogit.com
2017 © Pedro Peláez
Adds n:src and n:href macros which append timestamp as a parameter to path (e.g. main.js?512a45c4)
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)
$ composer require slamecka/timestamp:dev-master
In your config.neon, (*5)
nette:
latte:
macros:
- TimestampMacro
MIT license, (*6)
Adds n:src and n:href macros which append timestamp as a parameter to path (e.g. main.js?512a45c4)
public domain
assets nette