草庐IT

grunt-bower

全部标签

javascript - 通过 bower 安装 jQuery-Mobile

在我的项目中,我想通过bower使用jquery-mobile。在我可以使用它之前,我必须随后在bower_components/jquery-mobile内部运行npminstall和grunt才能使用缩小.js和.css文件。这很乏味,如果我必须为我使用的每个库都这样做,我想我会退回到只下载文件并将它们添加到我的项目中。那么有没有更优雅的方式通过bower依赖来获取那些“最终”文件?我的bower.json"dependencies":{..."jquery-mobile":"latest",} 最佳答案 是否必须运行npm/g

javascript - grunt 服务器无法连接 <gruntjs>

module.exports=function(grunt){//Projectconfiguration.grunt.initConfig({server:{port:8888,base:'.'}});};C:\ProgramFiles\nodejs\test\grunt>C:\ProgramFiles\nodejs\test\grunt>gruntserverRunning"server"taskStartingstaticwebserveronport8888.完成,没有错误。但无法通过在浏览器中输入[http://127.0.0.1:8888][1]连接!jiong~如何在wi

javascript - 运行 grunt-bower 抛出 _.object 不是函数错误

我正在尝试运行grunt-bower任务来复制我所有的凉亭组件。Running"bower:dev"(bower)taskTypeError:_.objectisnotafunctionatObject.exports.getDests(/Users/wonoh/cocApp/node_modules/grunt-bower/tasks/lib/helpers.js:131:14)at/Users/wonoh/cocApp/node_modules/grunt-bower/tasks/bower.js:63:35atArray.forEach(native)at/Users/wonoh

javascript - 如何确保使用 Grunt 正确处理远程 @imports

我使用Grunt来构建我的项目和cssmin里面的任务。我的CSS文件包含一个远程@import语句并且gruntbuild返回一个警告:Running"cssmin:generated"(cssmin)task>>Ignoringremote@importof"http://fonts.googleapis.com/css?family=Lato:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic"asnocallbackgiven.,Ignoringremote@importof"http://

node.js - Bower - 安装包 "Arguments to path.join must be strings"时出错

我刚刚创建了一个Node项目,正在尝试使用bower安装jquery。bowerinstalljquery我收到以下错误:bowerjquery#*not-cachedgit://github.com/jquery/jquery.git#*bowerjquery#*resolvegit://github.com/jquery/jquery.git#*bowerjquery#*errorArgumentstopath.joinmustbestringsStacktrace:TypeError:Argumentstopath.joinmustbestringsatf(path.js:204

node.js - Ionic/bower/cordova - 忽略构建文件

我的项目结构如下:MyApp-hooks-platforms-android-ios-www-js/css/templates..-lib(includingallbowercomponents)目前,www/lib目录占用21,8 Mb。(我的项目中添加了大量的bower组件。)在构建每个项目时,将整个www文件夹复制到platform/android(例如)文件夹进行构建,当然包括www/lib.这导致构建非常大,因为bower中包含大量文件组件对生产毫无用处。手动管理所有bower依赖项显然不是一种选择。那么你们是如何清理项目平台目录以进行构建的呢?我正在考虑为此创建一个钩子(H

node.js - 如何在没有 grunt-cli 的情况下运行 grunt 0.4.*

我想知道是否可以在不安装grunt-cli的情况下运行grunt0.4.*。我知道grunt-cli会在我的项目目录的node-modules中查找安装的grunt版本,以便运行该版本的grunt但是......是否可以在没有安装grunt-cli的情况下运行grunt?怎么样?提前致谢! 最佳答案 grunt-cli是非常少量的代码。如果我是你,我会在GitHubrepository中查看它。.这样您就可以了解它的作用,而且很容易做到这一点。我很幸运能在没有grunt-cli的情况下运行它。您可以使用以下命令来完成:node-e"

node.js - 使用 grunt-contrib-less 编译更少的文件将不起作用

我正在使用Grunt构建我的Web项目。我安装了grunt-contrib-less打包并在我的grunt.initConfig({..});中添加了一个任务less:{options:{paths:['js/base']},files:{'js/base/*.css':'js/base/*.less'}}当我通过gruntless运行目标less,它可以正常运行,但不会将less文件编译为css文件。Running"less:files"(less)taskDone,withouterrors.我也通过node安装了lessc包。做lessc工作正常。目前我已经用files选项直接指

node.js - StriderCD 全局安装后在 bower 访问 $HOME/.config $HOME/.cache 时失败

我正在尝试找出全局安装StriderCD的最佳方法。我通过global-enabledforkofnvm安装了node和npm,并且所有路径都适用于其他构建,但它们都不需要像这样的后期安装。我已经尝试过sudonpminstall-gstrider以及不使用sudo以root身份安装,但我总是在.config和.cache上遇到EACCESS错误安装后步骤中bower的文件夹:>strider@1.6.6postinstall/usr/local/lib/node_modules/strider>bowerinstall--allow-root&&npmrunbuild/usr/loc

node.js - 使用 node.js 应用程序进行 Grunt livereload

我在Node.js中编写了一个应用程序(使用Express和socket.io),我想在开发和连接到Node.js应用程序时使用Grunt通过livereload编译我的客户端内容。我该怎么做?(由于路径和跨域问题,最好不要在另一个端口运行Node.js应用程序和在另一个端口运行客户端)我还安装了Yeoman,它使用的是开箱即​​用的grunt-contrib-livereload包,但据我了解,它使用Node.jsConnect服务器来提供客户端文件,因此与我的Node.js应用程序分离。.Yeoman生成的Gruntfile.js示例:varlrSnippet=require('g