2013-08-29 8 views
0

방금 ​​Windows 시스템에 삐걱 거리는 스프라이트 시트를 설치했는데 패키지를 실행하려고하면이 작업에 오류가 발생합니다. "grunt .spritesheet에는 스프라이트 및 시트 속성 "이 필요합니다.grunt-spritesheet를 실행하면 "grunt.spritesheet에 스프라이트와 시트 속성이 필요합니다"

패키지가 올바르게로드 된 것처럼 보입니다. 다른 모든 작업은 툴툴 거리며 실행됩니다. 파이썬 2.7과 카이로 의존성도로드되어있다. 내 주요 gruntfile에서

은 (이미 필요 jshint, 나침반 실행 벌금을 가지고있는), I는 추가 :

spritesheet: { 
    // An array of filename/source images array pairs. The basename of the sprite file 
    // is also prefixed to the CSS classes. 
    sprites: { 
    "images/icons/sprite.png": ['images/icons/*.png'] 
    }, 
    // The destination for the build stylesheet 
    sheet: "scss/homepsprite.css" 
} 

그래서, 속성 "스프라이트"와 "시트"분명히있다. 제가 누락 된 다른 것이 있습니까? 이 패키지는 꿀꿀 모듈의 나머지 부분과 벌금을로드 ... 내 gruntfile에

grunt.loadNpmTasks('grunt-spritesheet'); 

이뿐만 아니라 피드백을

grunt.registerTask("default", ["jshint", "requirejs:dev", "compass:dev", "spritesheet"]); 

감사합니다.

+0

다음은 플러그인 패키지에 대한 링크입니다. https://npmjs.org/package/grunt-spritesheet – eschutho

답변

1

grunt-spritesheet는 multitask이며 명명 된 하위 등록 정보 @를 모두 암시 적으로 반복합니다.

당신이 꿀꿀 아마 작업으로 "스프라이트"와 "시트"를 실행하려고 볼 수

: 문서가 다소 분명하지 않고, 당신이 "이름"을해야한다는 것을 의미

Running "spritesheet:sprites" (spritesheet) task 

당신의 작업에 대해 기본적으로 아무것도 할 수있는 (내가 generate 여기에 사용) :

spritesheet: { 
    generate: { 
    // An array of filename/source images array pairs. The basename of the sprite file 
    // is also prefixed to the CSS classes. 
    sprites: { 
     "images/icons/sprite.png": ['images/icons/*.png'] 
    }, 
    // The destination for the build stylesheet 
    sheet: "scss/homepsprite.css" 
    } 
} 

출력이 지금해야한다 :

Running "spritesheet:generate" (spritesheet) task 
+0

그래, 그 트릭을 했어. 정말 고마워! – eschutho