1
0
mirror of https://github.com/tabler/tabler-icons.git synced 2025-08-31 17:42:15 +02:00

update readme script

This commit is contained in:
codecalm
2022-09-09 01:10:16 +02:00
parent 714c968faa
commit 62f9542e6b
2 changed files with 13 additions and 2 deletions

View File

@@ -3,7 +3,7 @@
</p>
<p align="center">
A set of over <!--icons-count-->2600<!--/icons-count--> free MIT-licensed high-quality SVG icons for you to use in your web projects. Each icon is designed on a 24x24 grid and a 2px stroke.
A set of <!--icons-count-->2663<!--/icons-count--> free MIT-licensed high-quality SVG icons for you to use in your web projects. Each icon is designed on a 24x24 grid and a 2px stroke.
<p>
<p align="center">

View File

@@ -789,6 +789,17 @@ gulp.task('import-tags', (cb) => {
cb()
})
gulp.task('update-readme', (cb) => {
let fileData = fs.readFileSync('README.md').toString(),
count = glob.sync('./icons/*.svg').length
fileData = fileData.replace(/<!--icons-count-->(.*?)<!--\/icons-count-->/, `<!--icons-count-->${count}<!--/icons-count-->`);
fs.writeFileSync('README.md', fileData)
cb()
})
gulp.task('build-react', (cb) => {
cp.exec('npm run build-react', () => {
cb()
@@ -797,7 +808,7 @@ gulp.task('build-react', (cb) => {
gulp.task('build',
gulp.series('optimize', 'update-icons-version', 'update-icons-unicode', 'build-jekyll', 'build-copy', 'icons-sprite', 'svg-to-react', 'build-react',
'icons-preview', 'svg-to-png', 'build-iconfont', 'changelog-image', 'build-zip'))
'icons-preview', 'svg-to-png', 'build-iconfont', 'changelog-image', 'build-zip', 'update-readme'))
const optimizeSVG = (data) => {
return optimize(data, {