Ruby Sass function for adding timestamps to compiled CSS.
Requirements
- Ruby Sass 3.2+
Install
gem install sass-timestamp
Usage
-
Add
require "sass-timestamp"
insass
option orconfig.rb
if using compass. -
Add
#{timestamp()}
in the header or anywhere in your.scss
file:/* Compiled on #{timestamp()} */
output:
/* Compiled on 2015-02-02 13:01:40 +0800 */
Alternatively, for Unix-style time stamp, use #{unix_timestamp()}
.