Closed zikkeung closed 11 years ago
麻烦使用gm的命令检查下gm是否安装成功
发自我的 iPhone
在 2013年11月6日,17:09,zikkeung notifications@github.com 写道:
Loading "sprite.js" tasks...ERROR
Error: Cannot find module 'gm'
已经 brew install graphicsmagick ,但是不知道为什么会报错,系统是10.9
— Reply to this email directly or view it on GitHub.
~/Downloads/grunttest/ gm GraphicsMagick 1.3.18 2013-03-10 Q8 http://www.GraphicsMagick.org/ Copyright (C) 2002-2013 GraphicsMagick Group. Additional copyrights and licenses apply to this software. See http://www.GraphicsMagick.org/www/Copyright.html for details. Usage: gm command [options ...]
Where commands include: batch - issue multiple commands in interactive or batch mode benchmark - benchmark one of the other commands compare - compare two images composite - composite images together conjure - execute a Magick Scripting Language (MSL) XML script convert - convert an image or sequence of images help - obtain usage message for named command identify - describe an image or image sequence mogrify - transform an image or sequence of images montage - create a composite image (in a grid) from separate images time - time one of the other commands version - obtain release version
node的版本是 v0.10.21
从上面的结果来看,gm库是安装成功了的
你在grunt-sprite
目录里先安装各项依赖npm install
,然后再运行grunt
,看看返回什么
Er, test/publish/sprite/icon.png has been created ! test/publish/css/icon.sprite.css has been created ! Er, test/publish/sprite/icon@2x.png has been created ! test/publish/css/icon.sprite.css retina version has been created !
Done, without errors.
然后就可以了 = =#
呃,看上去你的gm
和 phantom
库都安装成功了。
关于Loading "sprite.js" tasks...ERROR Error: Cannot find module 'gm'
这个报错,可能是因为你的项目运行的目录不对,所以连任务脚本都没有载入成功。
grunt
项目运行目录里必须存在gruntfile.js
和package.json
两个文件,如果没有,会自动向上级寻找。
为什么运行之后 只copy了css 而且对css也没有任何改动
Loading "sprite.js" tasks...ERROR
已经 brew install graphicsmagick ,但是不知道为什么会报错,系统是10.9