Skip to content

Commit

Permalink
sprite-nostroke new file, version 1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
codecalm committed Mar 21, 2020
1 parent 7f83916 commit e58f56d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
Binary file modified .github/icons.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 4 additions & 3 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ gulp.task('icons-sprite', function (cb) {
let svg = `<svg xmlns="http://www.w3.org/2000/svg"><defs>${svgContent}</defs></svg>`;

fs.writeFileSync('tabler-sprite.svg', svg);
fs.writeFileSync('tabler-sprite-nostroke.svg', svg.replace(/stroke-width="2"\s/g, ''));
cb();
});
});
Expand Down Expand Up @@ -189,7 +190,7 @@ gulp.task('optimize', function (cb) {
.replace(/><\/(polyline|line|rect|circle|path)>/g, '/>')
.replace(/rx="([^"]+)"\s+ry="\1"/g, 'rx="$1"')
.replace(/\s?\/>/g, ' />')
.replace(/\n\s*<(line|circle|path|polyline)/g, "\n <$1")
.replace(/\n\s*<(line|circle|path|polyline|rect)/g, "\n <$1")
.replace(/polyline points="([0-9.]+)\s([0-9.]+)\s([0-9.]+)\s([0-9.]+)"/g, 'line x1="$1" y1="$2" x2="$3" y2="$4"')
.replace(/a([0-9.]+)\s([0-9.]+)\s([0-9.]+)\s?([0-1])\s?([0-1])\s?(-?[0-9.]+)\s?(-?[0-9.]+)/g, 'a$1 $2 $3 $4 $5 $6 $7')
.replace(/\n\n+/g, "\n");
Expand All @@ -204,7 +205,7 @@ gulp.task('optimize', function (cb) {
gulp.task('build-zip', function(cb) {
const version = p.version;

return gulp.src('{icons/**/*,icons-png/**/*,tabler-sprite.svg}')
return gulp.src('{icons/**/*,icons-png/**/*,tabler-sprite.svg,tabler-sprite-nostroke.svg}')
.pipe(zip(`tabler-icons-${version}.zip`))
.pipe(gulp.dest('packages'))
});
Expand Down Expand Up @@ -241,4 +242,4 @@ gulp.task('svg-to-png', gulp.series('build-jekyll', 'clean-png', async (cb) => {
cb();
}));

gulp.task('build', gulp.series('build-jekyll', 'build-copy', 'build-zip'));
gulp.task('build', gulp.series('optimize', 'build-jekyll', 'build-copy', 'icons-sprite', 'icons-preview', 'build-zip'));
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tabler-icons",
"version": "1.0.1",
"version": "1.0.2",
"repository": {
"type": "git",
"url": "git+https://github.com/tabler/tabler-icons.git"
Expand All @@ -13,15 +13,16 @@
"files": [
"icons/*",
"icons-png/*",
"tabler-sprite.svg"
"tabler-sprite.svg",
"tabler-sprite-nostroke.svg"
],
"homepage": "https://github.com/tabler/tabler-icons#readme",
"main": "gulpfile.js",
"scripts": {
"precommit": "gulp optimize",
"optimize": "gulp optimize",
"start": "bundle exec jekyll serve --watch --livereload",
"build": "gulp optimize && gulp build && gulp icons-preview && gulp icons-sprite",
"build": "gulp build",
"png": "gulp svg-to-png"
},
"description": "",
Expand Down
1 change: 1 addition & 0 deletions tabler-sprite-nostroke.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e58f56d

Please sign in to comment.