mirror of
https://github.com/logseq/logseq.git
synced 2026-05-25 13:14:39 +00:00
fix: streamline gulpfile with rawCopySrc utility and enhance container styles
This commit is contained in:
28
gulpfile.js
28
gulpfile.js
@@ -15,6 +15,8 @@ const mobileJsPath = path.join(mobilePath, 'js')
|
||||
const sourcePath = path.join(__dirname, 'src/main/frontend')
|
||||
const resourceFilePath = path.join(resourcesPath, '**')
|
||||
const outputFilePath = path.join(outputPath, '**')
|
||||
const rawCopySrc = (globs, options = {}) =>
|
||||
gulp.src(globs, { encoding: false, ...options })
|
||||
const staticCleanKeep = new Set([
|
||||
'entitlements.plist',
|
||||
'forge.config.js',
|
||||
@@ -76,13 +78,13 @@ const common = {
|
||||
},
|
||||
|
||||
syncResourceFile () {
|
||||
return gulp.src(resourceFilePath).pipe(gulp.dest(outputPath))
|
||||
return rawCopySrc(resourceFilePath).pipe(gulp.dest(outputPath))
|
||||
},
|
||||
|
||||
// NOTE: All assets from node_modules are copied to the output directory
|
||||
syncAssetFiles (...params) {
|
||||
return gulp.series(
|
||||
() => gulp.src([
|
||||
() => rawCopySrc([
|
||||
'node_modules/katex/dist/katex.min.js',
|
||||
'node_modules/katex/dist/contrib/mhchem.min.js',
|
||||
'node_modules/html2canvas/dist/html2canvas.min.js',
|
||||
@@ -106,28 +108,28 @@ const common = {
|
||||
pipe(replace('"@tabler/icons-react"]={},a.react,',
|
||||
'"tablerIcons"]={},a.React,')).
|
||||
pipe(gulp.dest(path.join(outputPath, 'js'))),
|
||||
() => gulp.src([
|
||||
() => rawCopySrc([
|
||||
'node_modules/@glidejs/glide/dist/glide.min.js',
|
||||
'node_modules/@glidejs/glide/dist/css/glide.core.min.css',
|
||||
'node_modules/@glidejs/glide/dist/css/glide.theme.min.css',
|
||||
]).pipe(gulp.dest(path.join(outputPath, 'js', 'glide'))),
|
||||
() => gulp.src([
|
||||
() => rawCopySrc([
|
||||
'node_modules/pdfjs-dist/legacy/build/pdf.mjs',
|
||||
'node_modules/pdfjs-dist/legacy/build/pdf.worker.mjs',
|
||||
'node_modules/pdfjs-dist/legacy/web/pdf_viewer.mjs',
|
||||
]).pipe(gulp.dest(path.join(outputPath, 'js', 'pdfjs'))),
|
||||
() => gulp.src([
|
||||
() => rawCopySrc([
|
||||
'node_modules/pdfjs-dist/cmaps/*.*',
|
||||
]).pipe(gulp.dest(path.join(outputPath, 'js', 'pdfjs', 'cmaps'))),
|
||||
() => gulp.src([
|
||||
() => rawCopySrc([
|
||||
'node_modules/inter-ui/inter.css',
|
||||
]).pipe(gulp.dest(path.join(outputPath, 'css'))),
|
||||
() => gulp.src('node_modules/inter-ui/web/*.*').
|
||||
() => rawCopySrc('node_modules/inter-ui/web/*.*').
|
||||
pipe(gulp.dest(path.join(outputPath, 'css', 'web'))),
|
||||
() => gulp.src([
|
||||
() => rawCopySrc([
|
||||
'node_modules/katex/dist/fonts/*.woff2',
|
||||
]).pipe(gulp.dest(path.join(outputPath, 'css', 'fonts'))),
|
||||
() => gulp.src([
|
||||
() => rawCopySrc([
|
||||
'node_modules/katex/dist/katex.min.js',
|
||||
'node_modules/katex/dist/contrib/mhchem.min.js',
|
||||
'node_modules/marked/lib/marked.umd.js',
|
||||
@@ -143,12 +145,12 @@ const common = {
|
||||
'packages/ui/dist/ui.js',
|
||||
'node_modules/@sqlite.org/sqlite-wasm/dist/sqlite3.wasm',
|
||||
]).pipe(gulp.dest(path.join(outputPath, 'mobile', 'js'))),
|
||||
() => gulp.src([
|
||||
() => rawCopySrc([
|
||||
'node_modules/inter-ui/inter.css',
|
||||
]).pipe(gulp.dest(path.join(outputPath, 'mobile', 'css'))),
|
||||
() => gulp.src('node_modules/inter-ui/web/*.*').
|
||||
() => rawCopySrc('node_modules/inter-ui/web/*.*').
|
||||
pipe(gulp.dest(path.join(outputPath, 'mobile', 'css', 'web'))),
|
||||
() => gulp.src([
|
||||
() => rawCopySrc([
|
||||
'node_modules/katex/dist/fonts/*.woff2',
|
||||
]).pipe(gulp.dest(path.join(outputPath, 'mobile', 'css', 'fonts'))),
|
||||
)(...params)
|
||||
@@ -160,7 +162,7 @@ const common = {
|
||||
},
|
||||
|
||||
syncAllStatic () {
|
||||
return gulp.src([
|
||||
return rawCopySrc([
|
||||
outputFilePath,
|
||||
'!' + path.join(outputPath, 'node_modules/**'),
|
||||
'!' + path.join(outputPath, 'mobile/**'),
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
"@tailwindcss/aspect-ratio": "0.4.2",
|
||||
"@tailwindcss/forms": "0.5.11",
|
||||
"@tailwindcss/typography": "0.5.19",
|
||||
"@types/gulp": "^4.0.18",
|
||||
"autoprefixer": "^10.4.27",
|
||||
"better-sqlite3": "^12.8.0",
|
||||
"cross-env": "^10.1.0",
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
.left-sidebar-inner {
|
||||
&.as-container {
|
||||
@apply relative h-full pt-3 overflow-y-auto overflow-x-hidden transition-transform;
|
||||
@apply transform-gpu translate-x-[-100%] z-[3];
|
||||
@apply transform-gpu translate-x-[-100%] z-[3] antialiased;
|
||||
|
||||
width: var(--ls-left-sidebar-sm-width);
|
||||
background-color: var(--left-sidebar-bg-color);
|
||||
|
||||
Reference in New Issue
Block a user