]> _ Git - cubeextranet.git/commitdiff
Tidy up compiler scripts - no longer need to specify extra CSS/LESS files manually...
authorstephen@cubedesigners.com <stephen@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 29 Aug 2017 10:40:11 +0000 (10:40 +0000)
committerstephen@cubedesigners.com <stephen@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 29 Aug 2017 10:40:11 +0000 (10:40 +0000)
inc/ws/Util/html5/burgermenu/class.ws.html5.compiler.php
inc/ws/Util/html5/master/class.ws.html5.links.php

index bb09cc700e71c502ec334e8a54907c4953f9a891..cf729c62857e5fbd4ae54630bac6c45c2daa012c 100644 (file)
@@ -92,15 +92,6 @@ class wsHTML5Compiler {
     // Collection of LESS files to be compiled
     // Filename with no extension, relative to the /style directory in the player build folder
     public $lessFiles = ['fluidbook'];
-    public $lessFilesExtras = [
-        // Extra files that will be copied when compiling LESS (eg. used to allow video-js-core.css to be copied)
-        'mmenu/mmenu.less',
-        'mmenu/jquery.mmenu.all.css',
-//        'mmenu/jquery.mmenu.css',
-//        'mmenu/jquery.mmenu.offcanvas.css',
-//        'mmenu/jquery.mmenu.positioning.css',
-//        'mmenu/jquery.mmenu.effects.css',
-    ];
 
        public $specialCSS = array();
        public $phonegapStandardPlugins = array('ios' => array('ExternalFileUtil'),
@@ -504,13 +495,10 @@ class wsHTML5Compiler {
         * @param $path The path of the file relative to the /style folder, without any extension
         * @param $extra_files Optional array of extra files that should be copied across for use during LESS compilation
         */
-       public function addLess($path, $extra_files = []) {
+       public function addLess($path) {
                if (!in_array($path, $this->lessFiles)) {
                        $this->lessFiles[] = $path;
                }
-
-               // Make sure no duplicates are added here either
-               $this->lessFilesExtras = array_unique(array_merge($this->lessFilesExtras, $extra_files));
        }
 
        protected function writeIndex() {
@@ -1471,16 +1459,6 @@ class wsHTML5Compiler {
                }
                file_put_contents($tmp . '/book-variables.less', implode("\n", $bookVariables));
 
-               // Also copy any "extra" files that might be needed by LESS compilation
-               // (eg. video-js-core.css is needed by videojs.less)
-               foreach ($this->lessFilesExtras as $extra) {
-                       $destination_extra = $tmp . '/' . $extra;
-                       if (!is_dir(dirname($destination_extra))) {
-                               mkdir(dirname($destination_extra), 0777, true);
-                       }
-                       copy($this->assets . '/style/' . $extra, $destination_extra);
-               }
-
                foreach ($this->lessFiles as $f) {
 
                        $source_less = $this->assets . '/style/' . $f . '.less';
index 88d000e4825b1e5383642895506e96f0f8a57baa..5ad7c36dde355d35d787fef4d9befbeb6a3e964c 100644 (file)
@@ -512,7 +512,7 @@ class internalLink extends normalLink {
 class videoLink extends wsHTML5Link {
        public static function addVideoJS($compiler) {
                $compiler->addJs('js/libs/videojs/video.js');
-               $compiler->addLess('videojs/videojs', ['videojs/video-js-core.css']);
+               $compiler->addLess('videojs/videojs');
        }
 
        public function getClasses() {