Skip to content
This repository has been archived by the owner on Jan 14, 2019. It is now read-only.

Commit

Permalink
updated spritesmith template to take in image and sprite directories …
Browse files Browse the repository at this point in the history
…from config
  • Loading branch information
reintroducing committed Aug 3, 2015
1 parent c8e2199 commit ecd7d9d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
_internal
.DS_Store
node_modules
1 change: 0 additions & 1 deletion app/templates/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@

// strict mode
"strict": [2, "global"],
"global-strict": 0,

// variables
"no-delete-var": 2,
Expand Down
8 changes: 6 additions & 2 deletions app/templates/gulp/tasks/sprites.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ gulp.task('sprites', function() {
cssName: '_sprites-2x.scss',
cssTemplate: tmpl,
cssOpts: {
sprite_type: '2x'
sprite_type: '2x',
img_dir: config.img,
sprite_dir: config.sprites
},
padding: padding
})),
Expand All @@ -28,7 +30,9 @@ gulp.task('sprites', function() {
cssName: '_sprites-1x.scss',
cssTemplate: tmpl,
cssOpts: {
sprite_type: '1x'
sprite_type: '1x',
img_dir: config.img,
sprite_dir: config.sprites
},
padding: padding
})),
Expand Down
2 changes: 1 addition & 1 deletion app/templates/gulp/utils/spritesmith.template.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ $sprite-{{options.sprite_type}}: (
height: {{px.height}},
total-width: {{px.total_width}},
total-height: {{px.total_height}},
image: "../images/sprites/{{{escaped_image}}}"
image: "../{{img_dir}}/{{sprite_dir}}/{{{escaped_image}}}"
),
{{/items}}
);

0 comments on commit ecd7d9d

Please sign in to comment.