Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
K
kpp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alexandr Veselov
kpp
Commits
da89800f
Commit
da89800f
authored
May 28, 2017
by
Nikolay Gromov
Committed by
GitHub
May 28, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update gulpfile.js
parent
45a1c4e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
6 deletions
+1
-6
gulpfile.js
gulpfile.js
+1
-6
No files found.
gulpfile.js
View file @
da89800f
...
...
@@ -21,7 +21,6 @@ const rename = require('gulp-rename');
const
size
=
require
(
'gulp-size'
);
const
del
=
require
(
'del'
);
const
newer
=
require
(
'gulp-newer'
);
const
replace
=
require
(
'gulp-replace'
);
// Получим настройки проекта из projectConfig.json
let
projectConfig
=
require
(
'./projectConfig.json'
);
...
...
@@ -193,7 +192,6 @@ gulp.task('sprite:svg', function (callback) {
if
((
projectConfig
.
blocks
[
'sprite-svg'
])
!==
undefined
)
{
const
svgstore
=
require
(
'gulp-svgstore'
);
const
svgmin
=
require
(
'gulp-svgmin'
);
const
cheerio
=
require
(
'gulp-cheerio'
);
if
(
fileExist
(
spriteSvgPath
)
!==
false
)
{
console
.
log
(
'---------- Сборка SVG спрайта'
);
return
gulp
.
src
(
spriteSvgPath
+
'*.svg'
)
...
...
@@ -207,11 +205,7 @@ gulp.task('sprite:svg', function (callback) {
}
}))
.
pipe
(
svgstore
({
inlineSvg
:
true
}))
.
pipe
(
cheerio
(
function
(
$
)
{
$
(
'svg'
).
attr
(
'style'
,
'display:none'
);
}))
.
pipe
(
rename
(
'sprite-svg.svg'
))
.
pipe
(
replace
(
/viewbox/gm
,
'viewBox'
))
// увы, сборщик пока портит этот атрибут https://github.com/w0rm/gulp-svgstore/issues/83
.
pipe
(
size
({
title
:
'Размер'
,
showFiles
:
true
,
...
...
@@ -273,6 +267,7 @@ gulp.task('sprite:png', function (callback) {
// Сборка HTML
gulp
.
task
(
'html'
,
function
()
{
const
fileinclude
=
require
(
'gulp-file-include'
);
const
replace
=
require
(
'gulp-replace'
);
console
.
log
(
'---------- сборка HTML'
);
return
gulp
.
src
(
dirs
.
srcPath
+
'/*.html'
)
.
pipe
(
plumber
({
...
...
Write
Preview
Markdown
is supported
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