aboutsummaryrefslogtreecommitdiff
path: root/gulpfile.js
diff options
context:
space:
mode:
authorcodecalm <codecalm@gmail.com>2020-12-11 12:40:34 +0100
committercodecalm <codecalm@gmail.com>2020-12-11 12:40:34 +0100
commitd2c67f074b0232a2a9eca6eeb506fa4548201c54 (patch)
treecb3387a71ec49e574989cc1afc9895d0e48f2724 /gulpfile.js
parenticons tags (diff)
parentfix #100 (diff)
downloadtabler-icons-d2c67f074b0232a2a9eca6eeb506fa4548201c54.tar.xz
Merge branch 'master' of https://github.com/tabler/tabler-icons into dev
 Conflicts:  gulpfile.js  icons/arrow-bottom-bar.svg  icons/arrow-bottom-circle.svg  icons/arrow-bottom-square.svg  icons/arrow-bottom-tail.svg  icons/arrow-left-bar.svg  icons/arrow-left-circle.svg  icons/arrow-left-square.svg  icons/arrow-left-tail.svg  icons/arrow-right-bar.svg  icons/arrow-right-circle.svg  icons/arrow-right-square.svg  icons/arrow-right-tail.svg  icons/arrow-top-bar.svg  icons/arrow-top-circle.svg  icons/arrow-top-square.svg  icons/arrow-top-tail.svg  icons/arrows-down-up.svg  icons/arrows-down.svg  icons/arrows-left-right.svg  icons/arrows-left.svg  icons/arrows-right-left.svg  icons/arrows-right.svg  icons/arrows-up-down.svg  icons/arrows-up.svg  icons/brand-booking.svg  icons/credit-card-off.svg  icons/file-alert.svg  icons/file-analytics.svg  icons/layout-grid-add.svg  icons/pizza.svg  icons/square-rotated.svg  package.json  src/_icons/arrow-bottom-bar.svg  src/_icons/arrow-bottom-circle.svg  src/_icons/arrow-bottom-square.svg  src/_icons/arrow-bottom-tail.svg  src/_icons/arrow-left-bar.svg  src/_icons/arrow-left-circle.svg  src/_icons/arrow-left-square.svg  src/_icons/arrow-left-tail.svg  src/_icons/arrow-loop-left.svg  src/_icons/arrow-loop-right.svg  src/_icons/arrow-right-bar.svg  src/_icons/arrow-right-circle.svg  src/_icons/arrow-right-square.svg  src/_icons/arrow-right-tail.svg  src/_icons/arrow-top-bar.svg  src/_icons/arrow-top-circle.svg  src/_icons/arrow-top-square.svg  src/_icons/arrow-top-tail.svg  src/_icons/arrow-wave-left-down.svg  src/_icons/arrow-wave-left-up.svg  src/_icons/arrow-wave-right-down.svg  src/_icons/arrow-wave-right-up.svg  src/_icons/arrows-down-up.svg  src/_icons/arrows-down.svg  src/_icons/arrows-join-2.svg  src/_icons/arrows-join.svg  src/_icons/arrows-left-right.svg  src/_icons/arrows-left.svg  src/_icons/arrows-right-left.svg  src/_icons/arrows-right.svg  src/_icons/arrows-split-2.svg  src/_icons/arrows-split.svg  src/_icons/arrows-up-down.svg  src/_icons/arrows-up.svg  src/_icons/bell-off.svg  src/_icons/bell-ringing-2.svg  src/_icons/bone.svg  src/_icons/brand-asana.svg  src/_icons/brand-bing.svg  src/_icons/brand-bitbucket.svg  src/_icons/brand-booking.svg  src/_icons/brand-disqus.svg  src/_icons/brand-docker.svg  src/_icons/brand-google-analytics.svg  src/_icons/brand-gravatar.svg  src/_icons/brand-hipchat.svg  src/_icons/brand-kickstarter.svg  src/_icons/brand-netflix.svg  src/_icons/brand-open-source.svg  src/_icons/brand-pagekit.svg  src/_icons/brand-patreon.svg  src/_icons/brand-producthunt.svg  src/_icons/brand-sass.svg  src/_icons/brand-sentry.svg  src/_icons/brand-shazam.svg  src/_icons/brand-stripe.svg  src/_icons/brand-unsplash.svg  src/_icons/brand-ycombinator.svg  src/_icons/file-alert.svg  src/_icons/file-analytics.svg  src/_icons/file-code-2.svg  src/_icons/file-export.svg  src/_icons/file-import.svg  src/_icons/layout-grid-add.svg  src/_icons/pizza.svg  src/_icons/rainbow.svg  src/_icons/square-rotated.svg  src/_icons/switch-2.svg  src/_icons/switch-3.svg  src/_icons/trending-down-2.svg  src/_icons/trending-down-3.svg  src/_icons/trending-up-2.svg  src/_icons/trending-up-3.svg  tags.json
Diffstat (limited to 'gulpfile.js')
-rw-r--r--gulpfile.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/gulpfile.js b/gulpfile.js
index 1817ff9d..d461eecd 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -626,17 +626,17 @@ const setVersions = function(version, files) {
if (fs.existsSync(`src/_icons/${file}.svg`)) {
let svgFile = fs.readFileSync(`src/_icons/${file}.svg`).toString();
-
+
if(!svgFile.match(/version: ([0-9.]+)/i)) {
svgFile = svgFile.replace(/---\n<svg>/i, function(m){
return `version: ${version}\n${m}`;
});
-
+
fs.writeFileSync(`src/_icons/${file}.svg`, svgFile);
} else {
console.log(`File ${file} already has version`);
}
-
+
} else {
console.log(`File ${file} doesn't exists`);
}
@@ -652,7 +652,7 @@ gulp.task('update-icons-version', function (cb) {
cp.exec(`git diff v${version} HEAD --name-status`, function (err, ret) {
let newIcons = [];
-
+
ret.replace(/[A]\s+src\/_icons\/([a-z0-9-]+)\.svg/g, function (m, fileName) {
newIcons.push(fileName);
});
@@ -674,7 +674,7 @@ gulp.task('import-tags', function(cb) {
}))
.on('data', (row) => {
console.log(row[0], row[1]);
-
+
const filename = `src/_icons/${row[0]}.svg`;
let data = fs.readFileSync(filename).toString();
@@ -685,7 +685,7 @@ gulp.task('import-tags', function(cb) {
return headerContent;
});
-
+
fs.writeFileSync(filename, data);
})