wip: 🚧 upgrading for gitea 1.21.3
This commit is contained in:
@ -4,6 +4,7 @@ import { buildFonts } from './fonts.js';
|
||||
import { buildTemplates } from './templates.js';
|
||||
import { copyTo } from './copy-to.js';
|
||||
import { restartService } from './restart-service.js';
|
||||
import { buildImg } from './img.js';
|
||||
import { extname } from 'path';
|
||||
import browsersync from 'browser-sync';
|
||||
|
||||
@ -31,6 +32,7 @@ export async function deploy(srcPath, distPath, serverPath, serviceName, file =
|
||||
try {
|
||||
await buildScss(srcPath, distPath);
|
||||
await buildFonts(srcPath, distPath);
|
||||
// await buildImg(srcPath, distPath);
|
||||
await buildTemplates(srcPath, distPath);
|
||||
await copyTo(distPath, serverPath);
|
||||
shouldRestart && await restartService(serviceName);
|
||||
|
@ -5,7 +5,7 @@ import { Logger } from '../utils/logger.js';
|
||||
|
||||
const logger = new Logger(buildFonts.name, 'info', 'brightCyan');
|
||||
const imgSrc = 'themes/fonts';
|
||||
const imgDest = '/public/fonts';
|
||||
const imgDest = '/public/assets/fonts';
|
||||
|
||||
export async function buildFonts(srcHome, distHome) {
|
||||
logger.info('Fonts build has started');
|
||||
|
@ -9,7 +9,7 @@ import { mkdirSync, copyFileSync } from 'fs';
|
||||
|
||||
const logger = new Logger(buildImg.name, 'info', 'brightGreen');
|
||||
const imgSrc = 'themes/img';
|
||||
const imgDest = '/public/img';
|
||||
const imgDest = '/public/assets/img';
|
||||
|
||||
export async function buildImg(srcHome, distHome) {
|
||||
logger.info('Images build has started');
|
||||
|
@ -6,7 +6,7 @@ import { compile } from 'sass';
|
||||
const logger = new Logger(buildScss.name, 'debug', 'pink');
|
||||
const themesSrc = 'themes/scss';
|
||||
const baseStylesSrc = 'styles';
|
||||
const cssDistPath = '/public/css';
|
||||
const cssDistPath = '/public/assets/css';
|
||||
|
||||
async function buildThemes(srcPath, distPath) {
|
||||
const themes = getScssFiles(srcPath, themesSrc);
|
||||
|
@ -3,13 +3,13 @@ import { copyFolderRecursiveSync } from '../utils/funcs.js';
|
||||
import { Logger } from '../utils/logger.js';
|
||||
|
||||
const logger = new Logger(buildTemplates.name, 'info', 'blue');
|
||||
const imgSrc = 'templates';
|
||||
const imgDest = '/';
|
||||
const tmplSrc = 'templates';
|
||||
const tmplDest = '/';
|
||||
|
||||
export async function buildTemplates(srcHome, distHome) {
|
||||
logger.info('Fonts build has started');
|
||||
const tmplSrcPath = join(srcHome, imgSrc);
|
||||
const tmplDestPath = join(distHome, imgDest);
|
||||
logger.info('Templates build has started');
|
||||
const tmplSrcPath = join(srcHome, tmplSrc);
|
||||
const tmplDestPath = join(distHome, tmplDest);
|
||||
|
||||
// just copy the entire tmplSrcPath to tmplDestPath
|
||||
copyFolderRecursiveSync(tmplSrcPath, tmplDestPath);
|
||||
|
Reference in New Issue
Block a user