Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Toolchain
sgc
Commits
bf1fc7e6
Commit
bf1fc7e6
authored
Jul 21, 2015
by
Philipp Nowinski
Browse files
[BUGFIX] check presence of sprite folder before starting sprity
parent
8c463eca
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/templates/gulp/css.js
View file @
bf1fc7e6
...
...
@@ -47,17 +47,20 @@ gulp.task('css', ['sprites', 'svg'], function() {
// create spritesheet
gulp
.
task
(
'
sprites
'
,
function
()
{
return
sprity
.
src
({
src
:
settings
.
path
().
sprites
+
'
/**/*.png
'
,
name
:
'
sprites
'
,
style
:
'
_sprite.scss
'
,
cssPath
:
path
.
relative
(
path
.
resolve
(
settings
.
path
().
css
),
path
.
resolve
(
settings
.
path
().
images
))
+
'
/
'
,
template
:
'
gulp/sprite-scss-template.mustache
'
,
orientation
:
'
binary-tree
'
,
cachebuster
:
true
})
.
pipe
(
imagemin
())
.
pipe
(
gulpif
(
'
*.png
'
,
gulp
.
dest
(
settings
.
path
().
images
),
gulp
.
dest
(
settings
.
path
().
sass
)));
// necessary right now because of https://github.com/sprity/sprity/issues/23
if
(
fs
.
existsSync
(
settings
.
path
().
sprites
))
{
return
sprity
.
src
({
src
:
settings
.
path
().
sprites
+
'
/**/*.png
'
,
name
:
'
sprites
'
,
style
:
'
_sprite.scss
'
,
cssPath
:
path
.
relative
(
path
.
resolve
(
settings
.
path
().
css
),
path
.
resolve
(
settings
.
path
().
images
))
+
'
/
'
,
template
:
'
gulp/sprite-scss-template.mustache
'
,
orientation
:
'
binary-tree
'
,
cachebuster
:
true
})
.
pipe
(
imagemin
())
.
pipe
(
gulpif
(
'
*.png
'
,
gulp
.
dest
(
settings
.
path
().
images
),
gulp
.
dest
(
settings
.
path
().
sass
)));
}
});
gulp
.
task
(
'
svg
'
,
function
()
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment