Note that there are some explanatory texts on larger screens.

plurals
  1. POHTML5 Boilerplate and multiple files and scripts
    primarykey
    data
    text
    <p>In my project I have multiple html files that I've added to the project.properties like this:</p> <pre><code># Files can be added in a comma separated form file.pages = loginapp.html, docapp.html, adminapp.html </code></pre> <p>The problem is that each of those files needs to load some app-unique scripts. E.g.:</p> <pre><code>&lt;!-- In adminapp.html: --&gt; &lt;!-- scripts concatenated and minified via ant build script--&gt; &lt;script defer src="js/mylibs/jquery.tmpl.js"&gt;&lt;/script&gt; &lt;script defer src="js/mylibs/knockout.js"&gt;&lt;/script&gt; &lt;script defer src="js/plugins.js"&gt;&lt;/script&gt; &lt;script defer src="js/helpers.js"&gt;&lt;/script&gt; &lt;script defer src="js/app.admin.js"&gt;&lt;/script&gt; &lt;!-- ** unique for login ** --&gt; &lt;script defer src="js/app.common.js"&gt;&lt;/script&gt; &lt;!-- end scripts--&gt; &lt;!-- in loginapp.html: --&gt; &lt;!-- scripts concatenated and minified via ant build script--&gt; &lt;script defer src="js/mylibs/jquery.tmpl.js"&gt;&lt;/script&gt; &lt;script defer src="js/mylibs/knockout.js"&gt;&lt;/script&gt; &lt;script defer src="js/plugins.js"&gt;&lt;/script&gt; &lt;script defer src="js/helpers.js"&gt;&lt;/script&gt; &lt;script defer src="js/app.login.js"&gt;&lt;/script&gt; &lt;!-- ** unique for admin ** --&gt; &lt;script defer src="js/app.common.js"&gt;&lt;/script&gt; &lt;!-- end scripts--&gt; </code></pre> <p>It works brilliant until I <code>ant build</code> it. </p> <p>It appears that HTML5 Boilerplate's build script has problems with figuring out what's going on here, and it only creates one concatenated file that contains the common stuff, and leaves the rest out (e.g. <code>app.login.js</code> and <code>app.admin.js</code> get copied into the <code>publish/</code> folder, but are not linked to in the minified HTML files (which only link to one script and that's the concatenated one). </p> <p>Is there any way to get this working? </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload