// Builds app/static/dist: kap.css (Concept + Bootstrap + app styles), Bootstrap JS, Font Awesome.
import * as sass from 'sass';
import { mkdirSync, writeFileSync, cpSync, rmSync } from 'node:fs';
import { fileURLToPath } from 'node:url';
import { dirname, join } from 'node:path';
const here = dirname(fileURLToPath(import.meta.url));
const out = join(here, '..', 'app', 'static', 'dist');
const nm = join(here, 'node_modules');
rmSync(out, { recursive: true, force: true });
mkdirSync(out, { recursive: true });
const res = sass.compile(join(here, 'scss', 'kap.scss'), {
loadPaths: [nm],
style: 'compressed',
quietDeps: true,
silenceDeprecations: ['import', 'global-builtin', 'color-functions', 'if-function'],
});
writeFileSync(join(out, 'kap.css'), res.css);
cpSync(join(nm, 'bootstrap/dist/js/bootstrap.bundle.min.js'), join(out, 'bootstrap.bundle.min.js'));
cpSync(join(nm, '@fortawesome/fontawesome-free/css/all.min.css'), join(out, 'fa/css/all.min.css'), { recursive: true });
for (const f of ['fa-solid-900.woff2', 'fa-regular-400.woff2', 'fa-brands-400.woff2']) {
cpSync(join(nm, '@fortawesome/fontawesome-free/webfonts', f), join(out, 'fa/webfonts', f), { recursive: true });
}
console.log('built', out, (res.css.length / 1024).toFixed(0) + ' KB css');
Tüm kodlar
KAP Finansal Analiz
Şirketlerin finansal tablolarını yıllar arası analiz eden web uygulaması
Lisans bilgisi projenin LICENSE dosyasında.