feat: ✨ dark and light themes
This commit is contained in:
@@ -5,9 +5,18 @@ import { buildTemplates } from './templates.js';
|
||||
import { copyTo } from './copy-to.js';
|
||||
import { restartService } from './restart-service.js';
|
||||
import { extname } from 'path';
|
||||
import browsersync from 'browser-sync';
|
||||
|
||||
const logger = new Logger('deploy', 'info', 'brightMagenta');
|
||||
|
||||
const sync = browsersync.create('lugit')
|
||||
|
||||
sync.init({
|
||||
proxy: 'http://lugit.local',
|
||||
port: 8080,
|
||||
})
|
||||
|
||||
|
||||
export async function deploy(srcPath, distPath, serverPath, serviceName, file = null) {
|
||||
logger.info('Deploying...');
|
||||
|
||||
@@ -18,7 +27,6 @@ export async function deploy(srcPath, distPath, serverPath, serviceName, file =
|
||||
shouldRestart = false;
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
await buildScss(srcPath, distPath);
|
||||
await buildFonts(srcPath, distPath);
|
||||
@@ -26,6 +34,10 @@ export async function deploy(srcPath, distPath, serverPath, serviceName, file =
|
||||
await copyTo(distPath, serverPath);
|
||||
shouldRestart && await restartService(serviceName);
|
||||
|
||||
if(!shouldRestart) {
|
||||
sync.reload();
|
||||
}
|
||||
|
||||
logger.info('Deployment successful!');
|
||||
} catch (error) {
|
||||
logger.error(`Deployment failed: ${error}`);
|
||||
|
||||
Reference in New Issue
Block a user