bower

bower使用入门

青春壹個敷衍的年華 提交于 2019-12-09 13:41:05
为什么使用bower,因为它尅节省你去git火网上找js的时间。 工具/原料 首先你得装node(npm),如果是windows用户还要装msysgit。 1.全局安装bower npm install -g bower 2.试着在项目文件夹下,下载jquery 和 underscore bower install jquery underscore 不过默认的文件目录有点奇怪是:app/bower_components 不过这可以通过配置更改。 创建一个文件名".bowerrc"在里面定义下载目录,比如: { "directory":"app/vendor" } 3 也可以添加bower.json配置文件1、自己手写。2、用bower.init初始化 bower install 可以把bower.json中的依赖(bower.json)下下来。 来源: oschina 链接: https://my.oschina.net/u/1585200/blog/775079

Bower安装与入门

☆樱花仙子☆ 提交于 2019-12-09 13:32:11
一、Bower介绍 Bower是一个客户端技术的软件包管理器,它可用于搜索、安装和卸载如JavaScript、HTML、CSS之类的网络资源,github上很多例程都使用bower来管理前端的通用依赖库,比如jquery, bootstarp, angularjs等等 二、Bower的安装 首先还是全局安装bower sudo npm install bower -g 三、Bower的使用 bower安装完成后,就可以开始安装前端依赖库了,使用以下命令: bower install <package> 如需要安装jQuery,进入项目目录,键入以下命令: bower install jquery 四、Bower的命令集 cache - Manage bower cache 缓存 - 管理bower的缓存 help - Display help information about Bower 帮助 - 显示bower的帮助信息 home - Opens a package homepage into your favorite browser 主页 - 在你喜欢的浏览器中打开包的github发布页 info - Info of a particular package 信息 - 查看包信息 init - Interactively create a bower.json file

ASP.NET 5系列教程 (五):在Visual Studio 2015中使用Grunt、Bowe

[亡魂溺海] 提交于 2019-12-09 13:30:41
基于Visual Studio 2015,你可以: 方便的管理前端包,如jQuery, Bootstrap, 或Angular。 自动运行任务,如LESS、JavaScript压缩、JSLint、JavaScript单元测试等。 方便的获得Web开发者生态圈的工具包。 为了实现这些场景,Visual Studio 2015已经内置了一些流行的第三方工具包: Bower :Web包管理器,Bower可以帮你安装前端包,包括JavaScript、CSS类库。对于服务器端包,请通过NuGet包管理。 Grunt and Gulp :Grunt和Gulp是基于JavaScript的运行任务。如你未用过类似功能,可以认为这是一个自动调度运行的app,ASP.NET 5工程模板使用的是Grunt运行任务。 npm (Node Package Manager). npm是一个node包管理器,最初被用于Node.js包管理。上面说的Bower、Grunt、Gulp用到了npm。 启动Visual Studio 2015,新建一个ASP.NET 5.0的工程,选择文件-> 新建工程->Visual C#->Web->ASP.NET Web应用程序: 在新建工程对话框,选择ASP.NET 5.0 Starter Web 创建一个ASP.NET MVC 6 app,工程文件结构如下: 该工程下

bower init command error (gitbash) in windows

 ̄綄美尐妖づ 提交于 2019-12-09 11:20:34
问题 When i run bower init in gitbash ,following error is displayed: bower ENOINT Register requires an interactive shell Additional error details: Note that you can manually force an interactive shell with --config.interactive 回答1: Issue: mintty.exe Issue 802 does provide a good explanation: I've tracked this down to an issue with mintty.exe. In the bower/lib/config.js file (line 34 for bower v 1.4.1), tty.isatty(1) returns false under mintty.exe , but true if you run cygwin.bat (which is bash -

how to install underscore.js in my angular application?

半城伤御伤魂 提交于 2019-12-09 10:30:53
问题 I used yo-angular to generate my angularjs template with bootstrap/grunt/bower. I also want to use underscore in the app: npm install underscore --save-dev In the MainCtrl I am calling underscore.js just to see whether it works: angular.module('yomanApp') .controller('MainCtrl', function ($scope) { $scope.awesomeThings = [ 'HTML5 Boilerplate', 'AngularJS', 'AngularJS' ]; _.each([1,2,3],console.log); }); When I run the application with Chrome I get this errmsg in the console: ReferenceError: _

Bower replacement in Visual Studio 2017 ASP.NET MVC Core Template

自作多情 提交于 2019-12-09 07:48:55
问题 Lately I created a ASP.NET MVC Core project from scratch using Visual Studio 2017 (15.6.3). I discovered the usual JavaScript frameworks: bootstrap jquery jquery-validation jquery-validation-unobtrusive But unfortunately all Bower support is gone! There's no bower.json , no .bowerrc and no "Manage Bower Packages..." anymore: What's wrong with Visual Studio's ASP.NET MVC Core template? Did Bower become obsolete? Please don't duplicate this question to How to use bower packages in Visual Studio

Unable to install bower on Openshift

六月ゝ 毕业季﹏ 提交于 2019-12-09 05:59:52
问题 I am unable to install bower on Openshift. I keep on getting errors like remote: npm ERR! Error: ENOENT, lstat '/var/lib/openshift/537xxxxcd/app-root/runtime/repo/node_modules/bower/node_modules/mout/array/intersection.js'[K remote: npm ERR! If you need help, you may report this log at:[K remote: npm ERR! <http://github.com/isaacs/npm/issues>[K remote: npm ERR! or email it to:[K remote: npm ERR! <npm-@googlegroups.com>[K You can see full deployment logs https://s3.amazonaws.com/archive.travis

bower automatically update bower.json

点点圈 提交于 2019-12-09 04:00:42
问题 I run the following commands using bower 1.0.0: mkdir testdir;cd testdir bower init #accept defaults bower install jquery -s #the -s is supposed to cause update of bower.json less bower.json In bower.json I expect to see dependencies listed, but there are none. What is going on? NOTE: bower install jquery --save does work NOTE: The option I am referring to was documented through bower help install **-S**, --save Save installed packages into the project's bower.json dependencies 回答1: from

How to install Bootstrap v4 alpha using bower? [duplicate]

主宰稳场 提交于 2019-12-08 19:23:25
问题 This question already has answers here : Installing Bootstrap 4 with bower (4 answers) Closed 3 years ago . The v4-alpha documentation states Bootstrap v4.0.0-alpha is available for download in several ways, including some of your favorite package managers. however, the mentioned bower install bootstrap installs the latest stable release 3.3.5 instead. How to install v4 alpha using bower? 回答1: To install a specific version, append the GitHub tag using #: bower install bootstrap#4.0.0-alpha

How do I include libraries that installed via NPM to my MVC project on Visual Studio 2017

让人想犯罪 __ 提交于 2019-12-08 17:38:22
问题 I am trying to move from Bower to NPM . While I was using Bower , it was easy to configure the .bowerrc file and have the downloaded libraries in a directory such as wwwroot/lib Now, I am developing a ASP.Net Core MVC app and trying to use NPM as my default package manager. By using Command Line in Visual Studio 2017, NPM creates package.json file and download libraries to node_modules folder. Then, what is next? How can I get JS or CSS files like I used to have in wwwroot/lib director? 回答1: