简体   繁体   English

如何在Lineman的HTML开头添加来自app.js的javascript文件?

[英]How do I add a javascript file out of app.js in Lineman , in the beginning of the HTML?

I'm using Lineman and I have to include Modernizr.js before the body tag in my page. 我正在使用Lineman,并且必须在页面的body标签之前包含Modernizr.js。 The regular app.js should be in its default location, at the end of the body. 常规app.js应位于正文的末尾,位于其默认位置。 It happens that every javascript file I include in the project gets bundled inside app.js . 碰巧我在项目中包含的每个javascript文件都捆绑在app.js中。

I just fugure out how to deal with this problem. 我只是想出如何解决这个问题。 I just use the "static" folder under the Lineman project. 我只使用Lineman项目下的“静态”文件夹。 Every asset you put there gets untouched. 您放置在此处的所有资产都保持不变。 So I created a "js" folder and put my modernizr.js file ther. 因此,我创建了一个“ js”文件夹,然后将我的modernizr.js文件放在了该文件夹中。 In the web page, just need to reference it by "js/modernizr.js". 在网页中,只需通过“ js / modernizr.js”进行引用。

I'm just loving Lineman.js. 我只是喜欢Lineman.js。 Really cool! 真酷!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 HTMl 文件中显示我的 react App.Js? - How do I display my react App.Js in the HTMl file? 如何在Node JS应用程序JavaScript中从index.html调用函数到app.js文件 - How to call a function from index.html to app.js file in node js application javascript 如何从同一选项卡中的 App.js 文件导航到我的 html 文件? - How can I navigate to my html file from App.js file in same tab? 我如何将这个 function 从 app.js 中移出? - How can i move this function out from app.js? 在所有页面上运行document.getElementById('age')的App.js文件? 我如何包含这个 - App.js file running document.getElementById('age') on all pages? How do I contain this 我如何将mongoose / mongodb连接到我的React App.js文件 - How do I connect mongoose/mongodb to my React App.js file 如何将我的 src/app.js 文件链接到 babel - how do I link my src/app.js file to babel 如何将数据从 * .ejs 文件传输到 app.js 并处理 app.js 文件上 HTML 标签上的点击事件 - How to transfer data from * .ejs file to app.js and handle click event on HTML tag on app.js file 如何在App.js中处理多个路由? - How do I handle Multiple Routes In App.js? 如何将数据从一个 app.js 文件发送到 Routes 中的 index.ejs 文件 - how do I send data from one app.js file to index.ejs file in Routes
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM