Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
build script does not maintain correct css and js path
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
rolfsf  
View profile  
 More options Jan 2 2012, 4:05 pm
From: rolfsf <rol...@gmail.com>
Date: Mon, 2 Jan 2012 13:05:52 -0800 (PST)
Local: Mon, Jan 2 2012 4:05 pm
Subject: build script does not maintain correct css and js path
When I run the build script, it's updating the css and js links with a
path that assumes the .html file is in the root

in other words:

<link rel="stylesheet" href="/css/style.css">

gets updated after build to

<link rel=stylesheet href='css/4392blah.css'>

which is fine for html files at the root, but not for files in a sub
directory  foo/foo.html

How to I configure the script to maintain the correct path?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
simon.woodhead  
View profile  
 More options Jan 9 2012, 6:36 am
From: "simon.woodhead" <simon.woodh...@gmail.com>
Date: Mon, 9 Jan 2012 03:36:52 -0800 (PST)
Local: Mon, Jan 9 2012 6:36 am
Subject: Re: build script does not maintain correct css and js path
You need to edit the build.xml script. Around line 630 a regex is used
to replace the js and css references to the concatenated versions but
it does not take account of subdirectories. I changed the lines there
to:
    <echo message="Update the HTML to reference our concatenated
script file: ${scripts.js}"/>    <!-- style.css replacement handled as
a replacetoken above -->    <replaceregexp match="&lt;!-- scripts
concatenated [\d\w\s\W]*?src=&quot;([\d\w\s\W]*?)js/[\d\w\s\W]*?!--
end ((scripts)|(concatenated and minified scripts))--&gt;"
replace="&lt;script defer src='\1${scripts.js}\'&gt;&lt;/script&gt;"
flags="m">      <fileset dir="${dir.intermediate}" includes="${page-
files}"/>    </replaceregexp>    <!--[! use comments like this one to
avoid having them get minified -->        <echo message="Updating the
HTML with the new css filename: ${style.css}"/>        <replaceregexp
match="&lt;!-- CSS concatenated [\d\w\s\W]*?href=&quot;([\d\w\s
\W]*?)css/[\d\w\s\W]*?!-- end CSS--&gt;" replace="&lt;link
rel='stylesheet' href='\1${style.css}'&gt;" flags="m">      <fileset
dir="${dir.intermediate}" includes="${page-files}"/>    </
replaceregexp>
I imagine the regex can be more efficient.
(I just posted this reply to the same question on stackoverflow and
there seem to be a few more people having the same problem if you have
a quick google.)

Simon
On Jan 2, 9:05 pm, rolfsf <rol...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »