Szybki start

...

Kroki
  1. Przygotuj strukturę projektu (np. src/ + assets/). Prepare a project structure (e.g., src/ + assets/).
  2. Uzupełnij netbundler.config.mjs. Fill in netbundler.config.mjs.
  3. Uruchom: node netbundler.mjs Run: node netbundler.mjs
  4. (Opcjonalnie) ustaw live: true, aby bundler obserwował zmiany. (Optional) set live: true to watch changes.
Co dostajesz w wyniku?

Gotowe pliki w katalogu wyjściowym: rozwinięte include, przepisane ścieżki @ i skopiowane assets. Ready output files: expanded includes, rewritten @ paths, and copied assets.

dist/
  index.html
  style.css
  app.js
  assets/
Przykład strukturyExample structure
project/
  netbundler.mjs
  netbundler.config.mjs
  src/
    index.html
    style.css
    app.js
    partials/
      header.html
      footer.html
  assets/
    images/
      logo.png

WskazówkaTip

NetBundler przetwarza pliki wejściowe „płasko” w katalogach src – a podfoldery świetnie nadają się na fragmenty includowane. NetBundler processes input files “flat” in src folders, while subfolders are great for included fragments.