Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removed the cache busting querystring on linked assets. This feature …

…creates unnecessary noise in the change log for a given YUI build.
  • Loading branch information...
commit e20e627777fe3165bf5558910d3cc348f1a1e924 1 parent 1623fbc
Adam Moore authored
Showing with 14 additions and 6 deletions.
  1. +9 −1 bin/yuidoc_generate.py
  2. +4 −4 template/main.tmpl
  3. +1 −1  test/event.sh
View
10 bin/yuidoc_generate.py
@@ -76,6 +76,7 @@ def _mkdir(newdir):
self.ydn = ydn
self.version = version
self.modulename = ""
+ self.timestamp = "" # if supplied, linked script and css will have a timestamp appended to the url for cache busting
self.moduletitle = ""
self.moduledesc = "Please supply a module block somewhere in your code"
# self.requires = None
@@ -279,7 +280,14 @@ def allprop_sort(x, y):
self.classnames.sort(soft_sort)
t = Template(file=os.path.join(self.templatepath, "main.tmpl"))
- t.timestamp = time.time()
+
+ # @TODO add command line option for timestamp
+ # timestamp = time.time()
+ timestamp = ""
+
+ t.timestamp = timestamp
+
+ transferToTemplate(const.REQUIRES, m, t)
self.modulename = mname
self.moduletitle = mname
View
8 template/main.tmpl
@@ -6,11 +6,11 @@
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>API: $modulename #if $classname# $classname #end if# #if $filename# $filename #end if# (YUI Library)</title>
- <link rel="stylesheet" type="text/css" href="assets/reset-fonts-grids-min.css?stamp=$timestamp" />
- <link rel="stylesheet" type="text/css" href="assets/api.css?stamp=$timestamp" />
+ <link rel="stylesheet" type="text/css" href="assets/reset-fonts-grids-min.css#if $timestamp#?stamp=$timestamp#end if#" />
+ <link rel="stylesheet" type="text/css" href="assets/api.css#if $timestamp#?stamp=$timestamp#end if#" />
- <script type="text/javascript" src="assets/api-js?stamp=$timestamp"></script>
- <script type="text/javascript" src="assets/ac-js?stamp=$timestamp"></script>
+ <script type="text/javascript" src="assets/api-js#if $timestamp#?stamp=$timestamp#end if#"></script>
+ <script type="text/javascript" src="assets/ac-js#if $timestamp#?stamp=$timestamp#end if#"></script>
</head>
<body id="yahoo-com">
View
2  test/event.sh
@@ -9,7 +9,7 @@ yuidoc_home=..
src=~/src/yui3/src
-parser_in="$src/event"
+parser_in="$src/event/js"
# The location to output the parser data. This output is a file containing a
# json string, and copies of the parsed files.
Please sign in to comment.
Something went wrong with that request. Please try again.