简体   繁体   English

在哪里写下凉亭代码来安装Alertify?

[英]Where to write bower code to install Alertify?

I am getting started with jquery plugins and I have decided to have a go at Alertify. 我开始使用jquery插件,我决定去看看Alertify。 I visited the webpage: http://fabien-d.github.io/alertify.js/ 我访问了网页: http//fabien-d.github.io/alertify.js/

It tells me to install using bower package management. 它告诉我使用bower包管理进行安装。 They even give the code for us. 他们甚至为我们提供代码。 What I want to know is where to write this code: 我想知道的是在哪里写这段代码:

$ bower install alertify

Should I write it in the html file, css file or in the jquery file. 我应该在html文件,css文件还是jquery文件中编写它。

Why not just use "Inserting into HTML" method written on that site? 为什么不直接使用在该网站上编写的“插入HTML”方法?

Include JS 包括JS

<!-- ideally at the bottom of the page -->
<!-- also works in the <head> -->
<script src="PATH_TO_FILE/alertify.min.js"></script>

Include CSS 包括CSS

<!-- include the core styles -->
<link rel="stylesheet" href="PATH_TO_FILE/alertify.css" />
<!-- include a theme, can be included into the core instead of 2 separate files -->
<link rel="stylesheet" href="PATH_TO_FILE/alertify.default.css" />

If you want to use Bower, you should use node.js. 如果你想使用Bower,你应该使用node.js. You can find info about Bower in its github page . 你可以在它的github页面找到关于Bower的信息。

To answer your question, you enter that into the command line. 要回答您的问题,请将其输入命令行。 Bower is a package manager that is run from the command line and requires Node and npm. Bower是一个从命令行运行的包管理器,需要Node和npm。 If you are just getting started with jQuery plugins, I think it would be easier to download and include the plugin into your project. 如果您刚刚开始使用jQuery插件,我认为下载并将插件包含在您的项目中会更容易。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM