-
-
Notifications
You must be signed in to change notification settings - Fork 19
@include directives
Lucio Paiva edited this page Sep 21, 2019
·
1 revision
You can include other scripts into your main script using the @include
directive. For example:
// @include my-script.js
// @include "some other script.js"
setup(); // `setup` is defined in `my-script.js`
Witchcraft checks each script recursively, meaning you can include scripts that include other scripts, and so on.
Don't worry about dependency cycles; Witchcraft will handle them for you. If script A includes script B, which includes script A, A won't be included a second time.