bower

pc移动端自适应布局html页面(二)

放肆的年华 提交于 2019-12-08 02:45:47
效果图 <!doctype html> <html lang=""> <head> <meta charset="utf-8"> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="renderer" content="webkit"> <title>biPcMobile</title> <link rel="apple-touch-icon" href="apple-touch-icon.png"> <!-- Place favicon.ico in the root directory --> <!-- build:css styles/vendor.css --> <link rel="stylesheet" href="/bower_components/bootstrap/dist/css/bootstrap.min.css"> <!-- bower:css --> <!-- endbower --> <!-- endbuild --> <!-- build:css styles

Capistrano returning wrong release_path

岁酱吖の 提交于 2019-12-08 02:27:24
问题 I have a question about capistrano version 3.2.1. In my deploy.rb file I'm using the following line: set :theme_path, "#{release_path}/web/app/themes/myproject" The variable release_path is not showing to latest release folder, lets say 201409151420 as it should, but it is pointing to folder current , so the output is: DEBUG[68031037] Command: cd /var/www/myproject/current/web/app/themes/myproject && ( WP_ENV=staging /usr/bin/env npm install --silent ) The output should be: DEBUG[68031037]

Brunch installed with phoenix app doesn't work with bower assets

扶醉桌前 提交于 2019-12-08 02:20:17
问题 I have created Phoenix 1.0.4 (Elixir) application. After I had added some logic in application I wanted to switch my work for front-end part. On page http://www.jonathanbirkholz.com/how-to-use-font-awesome-on-phoenix/ I read that for 3rd assets I should use Bower. Unfortunately with font-awesome or bootstrap-sass from Bower and with command brunch build I always receive: /.../my_app/node_modules/acorn/dist/acorn.js:1747 throw err; ^ SyntaxError: Unexpected token (2:10) at Parser.pp.raise (/..

Puppet installing packages, but these do not seem to work

旧时模样 提交于 2019-12-07 19:29:21
问题 I have the following puppet file. It seems to have installed everything without errors, but commands such as yo or bower dont seem to work. Any idea why? class yeoman { Exec { path => [ "/bin/", "/sbin/" , "/usr/bin/", "/usr/sbin/" ] } $yeomanPackages = ["git", "rubygems", "libjpeg-turbo-progs", "optipng", "phantomjs", "python-software-properties" ] package { $yeomanPackages: ensure => "installed", require => Exec['apt-get update'], } exec { "apt-get update": command => "/usr/bin/apt-get

Bower => 前端开发也有包管理器

亡梦爱人 提交于 2019-12-07 15:59:48
最近看到一个专门针对前端的包管理工具Bower,它可用于搜索、安装和卸载如JavaScript、HTML、CSS之类的网络资源。实际上angularjs的种子项目就是用它的,看到了吗,它是专门针对客户端资源的,也就是说它管理的基本上都是前端工程师使用的东东. Bower是用于web前端开发的包管理器。对于前端包管理方面的问题,它提供了一套通用、客观的解决方案。它通过一个API暴露包之间的依赖模型,这样更利于使用更合适的构建工具。Bower没有系统级的依赖,在不同app之间也不互相依赖,依赖树是扁平的。 Bower运行在Git之上,它将所有包都视作一个黑盒子。任何类型的资源文件都可以打包为一个模块,并且可以使用任何规范(例如:AMD、CommonJS等)。 介绍完了Bower说一下它能给我们带来什么好处? 1. 节省时间。为什么要学习Bower的第一个原因,就是它会为你节省寻找客户端的依赖关系的时间。每次我需要安装jQuery的时候,我都需要去jQuery网站下载包或使用CDN版本。但是有了Bower,你只需要输入一个命令,jquery就会安装在本地计算机上,你不需要去记版本号之类的东西,你也可以通过Bower的info命令去查看任意库的信息。 2. 脱机工作。Bower会在用户主目录下创建一个.bower的文件夹,这个文件夹会下载所有的资源、并安装一个软件包使它们可以离线使用

使用 npm 和 bower 发布插件

核能气质少年 提交于 2019-12-07 15:59:22
我在 Github 上看到过一些第三方插件,除了可以使用 git clone 之外,它们还可以使用 npm 或 bower 进行下载。于是我也尝试把自己编写的一个 jQuery 插件发布到 npm 和 bower,并且效果还不错。项目源码请看 「jquery.nail」 。 首先编写好的源码得先打上 tag 版本号,然后 push 到 Github 上。第一个步骤算是完成了。 先说 npm。npm 是 Nodejs 的包管理器,用过 gulp 的都知道很多 gulp 的插件都需要通过 npm 进行安装,现在也有许多其他的插件比如 jQuery 在 npm 上都搜得到。首先得安装 nodejs 和 npm,这里不细说了。然后得在 npm 的官网上注册一个账号,接着电脑上需添加 npm 账号,输入以下命令进行添加: $ npm addUser 接着再输入一条命令就能把源码发布到 npm 上: $ npm publish 搞定!很方便是吧,可以在 npm 官网上看能不能搜索到你刚刚发布的插件,或者是电脑上直接安装一下: $ npm install jquery.nail --save-dev npm 的发布已经结束。需要注意的是,如果你在大天朝使用的是淘宝镜像的话是无法发布的,它没有 addUser 这一条命令,这时需先暂时将 npm 淘宝镜像清除: $ npm config

Tags may not have any characters that encodeURIComponent encodes

帅比萌擦擦* 提交于 2019-12-07 11:40:46
问题 I'm migrating from bower to yarn, and in my bower.json file I have this dependency: Snap.svg": "snap.svg#^0.4.1 When I tried to do the same in the yarn dependencies file, I got this error : npm ERR! code EINVALIDTAGNAME npm ERR! Invalid tag name "snap.svg@^0.4.1": Tags may not have any characters that encodeURIComponent encodes. How can I solve this ? 回答1: Two things: First, the npm package name -- which yarn uses since it uses package.json -- is snapsvg whereas snap.svg (with a dot) is only

Visual Studio 2015 RTM - Where did bower_components go?

我是研究僧i 提交于 2019-12-07 08:32:14
问题 It looks like with Visual Studio 2015 RTM, the bower_components folder is gone and packages are saving directly to the wwwroot/lib/ folder. This would be verified by the fact that the default gulpfile no longer has a function for copying files from bower_components to wwwroot. However in the default project.json, bower_components is still in the "exclude" property even though the folder no longer exists. Possibly an oversight? Does anyone know what is going on with this? I didn't see anything

windows系统 npm “不是内或外部命令” 问题

六月ゝ 毕业季﹏ 提交于 2019-12-07 02:34:28
npm install -g express 或npm install -g bower 后,输入“express --v”或“bower install”,提示“不是内或外部命令” 。 贴吧里找到的解决方案是“C:\User\用户名\Appdata\roaming\npm 下面有没有express.cmd,有这个cmd的话,还报错,重装node,再不行,将上面那个文件夹加到path 环境变量里面去”。 检查发现,环境变量path确实设置了roaming\npm,但该目录下没有express和bower,重装仍然无效。 无奈之下找同事正常的机器一一比较差异,发现同事的global对应的node_modules也是在roaming\npm目录下;而我的设置过npm config set prefix "E:\nodejs\global",不在同一个目录。难道可执行命令是生成在global目录?!到我的global目录看了一下,果然express和express.cmd都在这个目录下!迅速的 改了环境变量的path到相应的global目录 ,express --version回车,3.5.3出来了!! 来源: oschina 链接: https://my.oschina.net/u/617626/blog/673502

Bower的简单使用教程

给你一囗甜甜゛ 提交于 2019-12-07 02:26:43
之前我们很多的第三方依赖包都是去各自的官网下载的,然后引入到我们的项目中,其实这是一种非常麻烦的做法,因为有个工具就是完全的可以替代着我们做这些事情,对于gower就不过多介绍了,下面简单的说下在项目中的使用吧: bower安装第三方插件很简单:bower install 首先bower回去查找query是否在他的注册库里,然后找到对应的GitHub地址,再然后bower就会去下载并安装jquery的最新稳定版本。 看下项目目录多了个bower_components目录,再进去可以看到 然后我们可以看到在项目中,会有个bower_components这个文件夹的出现,然后里面下载的即是我们的依赖包 如果我们需要安装的东西比较小众,在bower中并没有注册 bower还提供了一下的安装方式: 1、通过Github的短写安装。前边是注册帐号的名字,后边是项目的名字 2、还可以使用项目完整的Github地址,例如jquery的: https://github.com/jquery/jquery.git 3、如果没有在Github上立项,我们也可以直接通过URL安装。 bower也有个线上的搜索: 在这里我们可以直接搜索到在bower中注册的一些组件,这里面的owner是值由谁开发的 当然,我们还是要专业点的嘛~ 关于bower,还有两个配置文件: bower.son和bowerrc