A2nt\CMSNiceties\Templates\WebpackTemplateProvider
Synopsis
class WebpackTemplateProvider
implements
TemplateGlobalProvider
{
- // members
- private static integer $port = 3000;
- private static string $hostname = 'localhost';
- private static string $dist = 'client/dist';
- private static boolean $webp = false;
- // methods
- public static array get_template_global_variables()
- public static void loadCSS()
- public static void loadJS()
- public static void projectName()
- public static void mainTheme()
- public static void resourcesURL()
- public static bool isActive()
- protected static void _getPath()
- protected static void _toDevServerPath()
- public static void toPublicPath()
- public static void config()
Hierarchy
Implements
- SilverStripe\View\TemplateGlobalProvider
Members
private
- $dist — string
- $hostname — string
- $port — int
- $webp
Methods
protected
public
- config()
- get_template_global_variables()
- isActive() — Checks if dev mode is enabled and if webpack server is online
- loadCSS() — Load CSS file
- loadJS() — Load JS file
- mainTheme()
- projectName()
- resourcesURL()
- toPublicPath()