mirror of
https://github.com/tabler/tabler-icons.git
synced 2025-08-31 01:30:04 +02:00
update readme script
This commit is contained in:
@@ -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">
|
||||
|
13
gulpfile.js
13
gulpfile.js
@@ -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, {
|
||||
|
Reference in New Issue
Block a user