mirror of
https://github.com/logseq/logseq.git
synced 2026-04-24 22:25:01 +00:00
Enhance (dev): Tabler icons (#11468)
* handle tabler-icons resources
* test removing tabler-icons-react
* Revert "test removing tabler-icons-react"
This reverts commit ea2553628d.
* replace @tabler/icons-react with tablerIcons on dist file
* fix: incorrect global react variable for the tabler react library
---------
Co-authored-by: charlie <xyhp915@qq.com>
This commit is contained in:
@@ -6,6 +6,7 @@ const path = require('path')
|
||||
const gulp = require('gulp')
|
||||
const del = require('del')
|
||||
const ip = require('ip')
|
||||
const replace = require('gulp-replace');
|
||||
|
||||
const outputPath = path.join(__dirname, 'static')
|
||||
const resourcesPath = path.join(__dirname, 'resources')
|
||||
@@ -69,7 +70,11 @@ const common = {
|
||||
'node_modules/react/umd/react.development.js',
|
||||
'node_modules/react-dom/umd/react-dom.production.min.js',
|
||||
'node_modules/react-dom/umd/react-dom.development.js',
|
||||
'node_modules/prop-types/prop-types.min.js'
|
||||
]).pipe(gulp.dest(path.join(outputPath, 'js'))),
|
||||
() => gulp.src([
|
||||
'node_modules/@tabler/icons-react/dist/umd/tabler-icons-react.min.js'
|
||||
]).pipe(replace('"@tabler/icons-react"]={},a.react,', '"tablerIcons"]={},a.React,')).pipe(gulp.dest(path.join(outputPath, 'js'))),
|
||||
() => gulp.src([
|
||||
'node_modules/@glidejs/glide/dist/glide.min.js',
|
||||
'node_modules/@glidejs/glide/dist/css/glide.core.min.css',
|
||||
@@ -84,14 +89,13 @@ const common = {
|
||||
'node_modules/pdfjs-dist/cmaps/*.*',
|
||||
]).pipe(gulp.dest(path.join(outputPath, 'js', 'pdfjs', 'cmaps'))),
|
||||
() => gulp.src([
|
||||
'node_modules/@tabler/icons/iconfont/tabler-icons.min.css',
|
||||
'node_modules/inter-ui/inter.css',
|
||||
'node_modules/reveal.js/dist/theme/fonts/source-sans-pro/**',
|
||||
]).pipe(gulp.dest(path.join(outputPath, 'css'))),
|
||||
() => gulp.src('node_modules/inter-ui/Inter (web)/*.*')
|
||||
.pipe(gulp.dest(path.join(outputPath, 'css', 'Inter (web)'))),
|
||||
() => gulp.src([
|
||||
'node_modules/@tabler/icons/iconfont/fonts/**',
|
||||
'node_modules/@tabler/icons-webfont/fonts/**',
|
||||
'node_modules/katex/dist/fonts/*.woff2'
|
||||
]).pipe(gulp.dest(path.join(outputPath, 'css', 'fonts'))),
|
||||
)(...params)
|
||||
|
||||
Reference in New Issue
Block a user