# Include oder eigene Bibliothek / Library in Javascript möglich?

**URL:** <https://forum.calliope.cc/t/include-oder-eigene-bibliothek-library-in-javascript-moeglich/1003>\
**Category:** Fragen zu MakeCode/PXT\
**Created:** [24. Januar 2019 um 20:28 UTC](https://forum.calliope.cc/t/include-oder-eigene-bibliothek-library-in-javascript-moeglich/1003 "2019-01-24T20:28:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![KaJoga](https://avatars.discourse-cdn.com/v4/letter/k/278dde/32.png) [@KaJoga](https://forum.calliope.cc/u/KaJoga)\
**Post date:** [24. Januar 2019 um 20:28 UTC](https://forum.calliope.cc/t/include-oder-eigene-bibliothek-library-in-javascript-moeglich/1003/1 "2019-01-24T20:28:24Z")

</div>

Hallo!

Mein aktuelles Projekt nähert sich (in Javascript bzw. Typescript mit MakeCode) der 2000-Zeilen-Marke. Allmählich beginnt der Code unübersichtlich zu werden und ich würde gerne ein paar der Basisfunktionen in eine separate Datei auslagern (auch, um sie später in anderen Projekten weiterverwenden zu können).

Ein #include scheint es aber nicht zu geben.

Gibt es hier einen Weg?

---

<div class="post-metadata">

**Author:** ![klmi](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.calliope.cc/klmi/32/763_2.png) [@klmi](https://forum.calliope.cc/u/klmi)\
**Post date:** [24. Januar 2019 um 21:03 UTC](https://forum.calliope.cc/t/include-oder-eigene-bibliothek-library-in-javascript-moeglich/1003/2 "2019-01-24T21:03:02Z")

</div>

Ich würde dir als einfachsten Weg Custom-Blöcke empfehlen.  
[Hier](https://www.hackster.io/MKlein/16-digitale-ein-ausgange-am-calliope-mini-custom-blocks-cd1e9e) habe ich kurz gezeigt wie das geht.

---

<div class="post-metadata">

**Author:** ![KaJoga](https://avatars.discourse-cdn.com/v4/letter/k/278dde/32.png) [@KaJoga](https://forum.calliope.cc/u/KaJoga)\
**Post date:** [25. Januar 2019 um 17:40 UTC](https://forum.calliope.cc/t/include-oder-eigene-bibliothek-library-in-javascript-moeglich/1003/3 "2019-01-25T17:40:59Z")

</div>

Supi, das passt perfekt!

Wie ich sehe, hast Du aus Deinen Custom Blocks ein Paket auf github gemacht. Gibt es irgendwo eine Anleitung, wo steht, wie das geht? Das wäre vielleicht auch eine Option; dann können andere meinen Code auch nutzen.

---

<div class="post-metadata">

**Author:** ![klmi](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.calliope.cc/klmi/32/763_2.png) [@klmi](https://forum.calliope.cc/u/klmi)\
**Post date:** [25. Januar 2019 um 18:18 UTC](https://forum.calliope.cc/t/include-oder-eigene-bibliothek-library-in-javascript-moeglich/1003/4 "2019-01-25T18:18:11Z")

</div>

> **[Building your own extension](https://makecode.com/extensions/getting-started)**
>
> This guide describes a simple setup that requires nothing, but a web browser.
> We have another guide, if you want to
> use command line tools.

Du kannst (und musst) dazu [https://makecode.microbit.org](https://makecode.microbit.org)  
verwenden!
