Git Komut Rehberi & Terminal Asistanı
Sıfırdan Yeni Bir Depo Başlatın:
Mevcut Bir Git Deposu veya Klasörü Gönderin:
Hataları Geri Alma, İptal & Temizlik:
Son commit'i geri al (yapılan değişiklikleri korur):
git reset --soft HEAD~1
Yapılan yerel değişiklikleri iptal et (çalışma ağacını temizler):
git restore .
Takip edilmeyen gereksiz dosyaları sil:
git clean -fd
Değişiklikleri geçici sakla ve geri getir (stash):
git stash git stash pop
Dal (Branch) ve Sürüm Etiketleri:
Yeni dal aç ve geçiş yap:
git checkout -b yeni-ozellik git push -u origin yeni-ozellik
Sürüm etiketi (tag) oluştur ve gönder:
git tag -a v1.0.0 -m "Sürüm 1.0.0" git push origin --tags
25 lines
1.1 KiB
JavaScript
25 lines
1.1 KiB
JavaScript
// Stages the FreeCAD PlaneGCS WebAssembly 2D constraint solver (planegcs.js +
|
|||
|
|
// 484 KB planegcs.wasm) into apps/web/public/planegcs/ so the browser runtime can
|
||
|
|
// load it via a webpackIgnore dynamic import without bundler friction.
|
||
|
|
import { cp, mkdir } from "node:fs/promises";
|
||
|
|
import { existsSync } from "node:fs";
|
||
|
|
import { dirname, join } from "node:path";
|
||
|
|
import { fileURLToPath } from "node:url";
|
||
|
|
|
||
|
|
const root = join(dirname(fileURLToPath(import.meta.url)), "..");
|
||
|
|
const srcDir = join(root, "node_modules", "@salusoft89", "planegcs", "dist", "planegcs_dist");
|
||
|
|
const destDir = join(root, "apps", "web", "public", "planegcs");
|
||
|
|
|
||
|
|
const required = ["planegcs.js", "planegcs.wasm"];
|
||
|
|
for (const fileName of required) {
|
||
|
|
const fullPath = join(srcDir, fileName);
|
||
|
|
if (!existsSync(fullPath)) {
|
||
|
|
console.error(`[copy-planegcs-wasm] Missing ${fullPath}. Run \`npm install\` first.`);
|
||
|
|
process.exit(1);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
await mkdir(destDir, { recursive: true });
|
||
|
|
await Promise.all(required.map((fileName) => cp(join(srcDir, fileName), join(destDir, fileName))));
|
||
|
|
|
||
|
|
console.log("[copy-planegcs-wasm] staged planegcs.js + planegcs.wasm into apps/web/public/planegcs/");
|