Answers.Body: <p>One way to include JS (or CSS) files, is to use the <a href="http://buildwithcraft.com/docs/templating/includejsfile" rel="nofollow">includeJsFile</a> tag.
  This tag will queue your file and append to the end of the <code>&lt;body&gt;</code>.
  If, for some reason, you don't want this (say you want to include JQuery in the <code>&lt;head&gt;</code>), I would just use <code>&lt;script src=""&gt;</code> etc.</p>
  
  <p>This might also solve your second problem.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-10-08T07:29:19.760Z
Answers.Text: Hmm, that didn't work either. I don't know what is going on, but it might be a bug of sorts. It just fails to load the script if it has .min.js as the extension, and modernizr.js
Answers.UserDisplayName: Ryan
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-10-08T07:46:34.723Z
Answers.Text: Something to do with twig or craft checking the js file... !
Answers.UserDisplayName: Ryan
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-10-08T07:48:24.863Z
Answers.Text: Have you tried loading it directly with a <script> tag? Twig does nothing with script tags, so if that doesn't work, you can rule out a template problem.
Answers.UserDisplayName: Paul
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-10-08T07:50:06.593Z
Answers.Text: Did you put your JS and CSS files in the templates folder? Then don't. If they're in your public folder, Twig or Craft has nothing to do with 'em.
Answers.UserDisplayName: Paul
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-10-08T08:09:23.710Z
Answers.Text: Ahhh ok, I'll move them there. So it's all css images, js files, vendor stuff. CSS as well?
Answers.UserDisplayName: Ryan
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-10-08T16:31:57.213Z
Answers.Text: I keep everything in public, so Twig or Craft have nothing to do with it.
Answers.UserDisplayName: Paul
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-10-08T07:15:50.863Z
Answers.LastActivityDate: 2014-10-08T07:15:50.863Z
Answers.UserDisplayName: Paul
Body: <p>I am including head.html and scripts.html in my template. Most of the scripts load except for 2 yet the path is the same for all of them. I {% include %} them.</p>
  
  
  
  
  
  <p>If I change foundation.min.js to foundation.js it works. The min file exists. </p>
  
  <p><strong>Update:</strong>
  This is because JS files are checked for errors before being loaded. For example, if I visit those URL's directly it will show me an error. Any way to stop that?</p>
  
  <p><a href="http://craft.dev/bower_components/foundation/js/foundation.min.js" rel="nofollow noreferrer">http://craft.dev/bower_components/foundation/js/foundation.min.js</a></p>
  
  <p><img src="https://i.sstatic.net/F5w8O.png" alt="JS Error"></p>
  
  <p>Update:</p>
  
  <pre><code>&lt;script src="/bower_components/jquery/dist/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="/bower_components/foundation/js/foundation.min.js"&gt;&lt;/script&gt;
  &lt;script src="/bower_components/imagesloaded/imagesloaded.pkgd.min.js"&gt;&lt;/script&gt;
  &lt;script src="/bower_components/velocity/velocity.min.js"&gt;&lt;/script&gt;
  &lt;script src="/bower_components/velocity/velocity.ui.min.js"&gt;&lt;/script&gt;
  &lt;script src="/bower_components/wookmark-jquery/jquery.wookmark.min.js"&gt;&lt;/script&gt;
  &lt;script src="/js/app.js"&gt;&lt;/script&gt;
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-10-08T07:51:48.617Z
Comments.Text: Can you show me the part of your script.html file where you call the JS files?
Comments.UserDisplayName: Paul
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-10-10T02:22:55.520Z
Comments.Text: Sure, updated it. It wasn't the HTML though, something parses those scripts and checks them.
Comments.UserDisplayName: Ryan
Tags: <url><include>
Title: Correct way to include include scripts
ThreadText: # Correct way to include include scripts
  
  (Asked by: username_0 on 2014-10-08)
  
  I am including head.html and scripts.html in my template. Most of the scripts load except for 2 yet the path is the same for all of them. I {% include %} them.
  
  If I change foundation.min.js to foundation.js it works. The min file exists.
  
  **Update:**
  This is because JS files are checked for errors before being loaded. For example, if I visit those URL's directly it will show me an error. Any way to stop that?
  
  <http://craft.dev/bower_components/foundation/js/foundation.min.js>
  
  ![JS Error](https://i.sstatic.net/F5w8O.png)
  
  Update:
  
  ```
  <script src="/bower_components/jquery/dist/jquery.min.js"></script>
  <script src="/bower_components/foundation/js/foundation.min.js"></script>
  <script src="/bower_components/imagesloaded/imagesloaded.pkgd.min.js"></script>
  <script src="/bower_components/velocity/velocity.min.js"></script>
  <script src="/bower_components/velocity/velocity.ui.min.js"></script>
  <script src="/bower_components/wookmark-jquery/jquery.wookmark.min.js"></script>
  <script src="/js/app.js"></script>
  
  ```
  
  **Tags:** url, include
  
  > **Comments:**
  > **username_1**: Can you show me the part of your script.html file where you call the JS files?  
  > **username_0**: Sure, updated it. It wasn't the HTML though, something parses those scripts and checks them.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2014-10-08. Score: 1 | Accepted answer
  
  One way to include JS (or CSS) files, is to use the [includeJsFile](http://buildwithcraft.com/docs/templating/includejsfile) tag.
  This tag will queue your file and append to the end of the `<body>`.
  If, for some reason, you don't want this (say you want to include JQuery in the `<head>`), I would just use `<script src="">` etc.
  
  This might also solve your second problem.
  
  > **Comments:**
  > **username_0**: Hmm, that didn't work either. I don't know what is going on, but it might be a bug of sorts. It just fails to load the script if it has .min.js as the extension, and modernizr.js  
  > **username_0**: Something to do with twig or craft checking the js file... !  
  > **username_1**: Have you tried loading it directly with a <script> tag? Twig does nothing with script tags, so if that doesn't work, you can rule out a template problem.  
  > **username_1**: Did you put your JS and CSS files in the templates folder? Then don't. If they're in your public folder, Twig or Craft has nothing to do with 'em.  
  > **username_0**: Ahhh ok, I'll move them there. So it's all css images, js files, vendor stuff. CSS as well?  
  > **username_1**: I keep everything in public, so Twig or Craft have nothing to do with it.  
  
  ---
  
  