草庐IT

grunt-bower

全部标签

javascript - 使用 grunt 自动化 npm 和 bower 安装

我有一个Node/Angular项目,它使用npm进行后端依赖管理,使用bower进行前端依赖管理。我想使用grunt任务来执行这两个安装命令。我一直不知道该怎么做。我尝试使用exec,但它实际上并没有安装任何东西。module.exports=function(grunt){grunt.registerTask('install','installthebackendandfrontenddependencies',function(){//adaptedfromhttp://www.dzone.com/snippets/execute-unix-command-nodejsvare

javascript - 使用 grunt 自动化 npm 和 bower 安装

我有一个Node/Angular项目,它使用npm进行后端依赖管理,使用bower进行前端依赖管理。我想使用grunt任务来执行这两个安装命令。我一直不知道该怎么做。我尝试使用exec,但它实际上并没有安装任何东西。module.exports=function(grunt){grunt.registerTask('install','installthebackendandfrontenddependencies',function(){//adaptedfromhttp://www.dzone.com/snippets/execute-unix-command-nodejsvare

javascript - 配置 Node express 服务静态 bower_components?

我有一个目录结构projectName|-bower_components/|-public/|-css|-js|-index.html|-Gruntfile.js|-package.json|-bower.json|-app.js我想启动我的应用程序并使用Node提供index.html。所以在app.js我有:varexpress=require('express');varport=process.env.PORT||3000;varapp=express();app.configure(function(){//Serveupcontentfrompublicdirectory

javascript - 配置 Node express 服务静态 bower_components?

我有一个目录结构projectName|-bower_components/|-public/|-css|-js|-index.html|-Gruntfile.js|-package.json|-bower.json|-app.js我想启动我的应用程序并使用Node提供index.html。所以在app.js我有:varexpress=require('express');varport=process.env.PORT||3000;varapp=express();app.configure(function(){//Serveupcontentfrompublicdirectory

node.js - "Fatal error: Unable to find local grunt."运行 "grunt"命令时

我使用以下命令卸载了grunt。npmuninstall-ggrunt然后我再次使用以下命令安装了grunt。npminstall-ggrunt-cli访问以下链接:https://npmjs.org/package/grunt-html我想用上面的grunt插件但是当我运行grunt命令时,它给了我以下错误:D:\nodeJS\node_modules\grunt-html>gruntgrunt-cli:Thegruntcommandlineinterface.(v0.1.6)Fatalerror:Unabletofindlocalgrunt.Ifyou'reseeingthisme

node.js - "Fatal error: Unable to find local grunt."运行 "grunt"命令时

我使用以下命令卸载了grunt。npmuninstall-ggrunt然后我再次使用以下命令安装了grunt。npminstall-ggrunt-cli访问以下链接:https://npmjs.org/package/grunt-html我想用上面的grunt插件但是当我运行grunt命令时,它给了我以下错误:D:\nodeJS\node_modules\grunt-html>gruntgrunt-cli:Thegruntcommandlineinterface.(v0.1.6)Fatalerror:Unabletofindlocalgrunt.Ifyou'reseeingthisme

javascript - grunt (minimatch/glob) 文件夹排除

我有一种情况,我正在尝试使用grunt对代码库进行lint,不包括特定文件夹。grunt在后台使用minimatch(类似于bsdglob)来匹配文件,但我似乎无法弄清楚如何对文件夹进行.gitignore样式的排除。我想摄取这个:忽略并匹配这些:/folder/path/here/to/something/ok.js/another/folder/path.js/test.js但不匹配这些:/folder/ignoreme/something.js/folder/path/here/to/ignoreme/metoo/file.js这将匹配所有内容,包括ignoreme:/**/*.

javascript - grunt (minimatch/glob) 文件夹排除

我有一种情况,我正在尝试使用grunt对代码库进行lint,不包括特定文件夹。grunt在后台使用minimatch(类似于bsdglob)来匹配文件,但我似乎无法弄清楚如何对文件夹进行.gitignore样式的排除。我想摄取这个:忽略并匹配这些:/folder/path/here/to/something/ok.js/another/folder/path.js/test.js但不匹配这些:/folder/ignoreme/something.js/folder/path/here/to/ignoreme/metoo/file.js这将匹配所有内容,包括ignoreme:/**/*.

node.js - 如何更改 Bower 的默认组件文件夹?

我正在制作一个使用来自twitter的bower的新项目。我创建了一个component.json来维护我的所有依赖项,例如jquery。然后我运行bowerinstall将所有内容安装在一个名为components的文件夹中。但我需要将组件安装在不同的文件夹中,例如公共(public)/组件.我尝试将components.json编辑为:{"name":"test","version":"1.0.0","directory":"public/","dependencies":{"jquery":"*"}}或:{"name":"test","version":"1.0.0","comp

node.js - 如何更改 Bower 的默认组件文件夹?

我正在制作一个使用来自twitter的bower的新项目。我创建了一个component.json来维护我的所有依赖项,例如jquery。然后我运行bowerinstall将所有内容安装在一个名为components的文件夹中。但我需要将组件安装在不同的文件夹中,例如公共(public)/组件.我尝试将components.json编辑为:{"name":"test","version":"1.0.0","directory":"public/","dependencies":{"jquery":"*"}}或:{"name":"test","version":"1.0.0","comp