Skip to content

Instantly share code, notes, and snippets.

@levizwannah
Created July 10, 2023 01:14
Show Gist options
  • Save levizwannah/e6301f68ec56878b2ca9f52eb3cf4d11 to your computer and use it in GitHub Desktop.
Save levizwannah/e6301f68ec56878b2ca9f52eb3cf4d11 to your computer and use it in GitHub Desktop.
Configure OpenScript
/*----------------------------------
| Do OpenScript Configurations Here
|----------------------------------
*/
/**----------------------------------
* Set the default route path here
* Every route will be prefixed by
* this path.
* ----------------------------------
*/
// route.basePath('base-path/another-path');
/*-----------------------------------
| Set the directories in which we
| can find the context files
|-----------------------------------
*/
ContextProvider.directory = route.baseUrl('/js/contexts');
/*-----------------------------------
| Set the version number of the
| context files so that we can
| always load the new files in case
| files change
|-----------------------------------
*/
ContextProvider.version = '1.0.0';
/*-----------------------------------
| Set the default component
| directory for the loader
|-----------------------------------
*/
loader.dir = route.baseUrl('/js/components');
/*-----------------------------------
| Set the version number of the
| component files so that we load
| a fresh file when they change
|-----------------------------------
*/
loader.version = '1.0.0';
/*-----------------------------------
| Set the default directory of the
| autoload object for loading files.
| the autoload object loads any JS
| file as long it contains classes.
|-----------------------------------
*/
autoload.dir = route.baseUrl('/docs/js');
/*-----------------------------------
| Set the version number of the
| JS files so that we load
| a fresh file when they change
|-----------------------------------
*/
autoload.version = '1.0.0';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment