private function createPageJs(string $name, array $data, string $pathFile)
    {
        $minifier = new Minify\JS("");

        foreach ($data as $datum) {
            if (in_array($datum['nome'], $this->param['js'])) {
                foreach ($datum['arquivos'] as $file) {
                    if ($file['type'] === "text/javascript")
                        $minifier->add($file['content']);
                }
            }
        }

        if (file_exists(PATH_HOME . $pathFile . "assets/{$name}.min.js"))
            $minifier->add(file_get_contents(PATH_HOME . $pathFile . "assets/{$name}.min.js"));
        elseif (file_exists(PATH_HOME . $pathFile . "assets/{$name}.js"))
            $minifier->add(file_get_contents(PATH_HOME . $pathFile . "assets/{$name}.js"));

        $minifier->minify(PATH_HOME . "assetsPublic/view/{$name}.min.js");
    }
private function createPageJs(string $name, array $data, string $pathFile)
    {
        $minifier = new Minify\JS("");

        foreach ($data as $datum) {
            if (in_array($datum['nome'], $this->param['js'])) {
                foreach ($datum['arquivos'] as $file) {
                    if ($file['type'] === "text/javascript")
                        $minifier->add($file['content']);
                }
            }
        }

        if (file_exists(PATH_HOME . $pathFile . "assets/{$name}.min.js"))
            $minifier->add(file_get_contents(PATH_HOME . $pathFile . "assets/{$name}.min.js"));
        elseif (file_exists(PATH_HOME . $pathFile . "assets/{$name}.js"))
            $minifier->add(file_get_contents(PATH_HOME . $pathFile . "assets/{$name}.js"));

        $minifier->minify(PATH_HOME . "assetsPublic/view/{$name}.min.js");
    }
private function createPageJs ( string $ name , array $ data , string $ pathFile ) { $ minifier = new Minify \ JS ( "" ) ; foreach ( $ data as $ datum ) { if ( in_array ( $ datum [ 'nome' ] , $ this -> param [ 'js' ] ) ) { foreach ( $ datum [ 'arquivos' ] as $ file ) { if ( $ file [ 'type' ] === "text/javascript" ) $ minifier -> add ( $ file [ 'content' ] ) ; } } } if ( file_exists ( PATH_HOME . $ pathFile . "assets/{$name}.min.js" ) ) $ minifier -> add ( file_get_contents ( PATH_HOME . $ pathFile . "assets/{$name}.min.js" ) ) ; elseif ( file_exists ( PATH_HOME . $ pathFile . "assets/{$name}.js" ) ) $ minifier -> add ( file_get_contents ( PATH_HOME . $ pathFile . "assets/{$name}.js" ) ) ; $ minifier -> minify ( PATH_HOME . "assetsPublic/view/{$name}.min.js" ) ; }
Cria View Assets JS
@param string $name
@param array $data
@param string $pathFile
Cria View Assets JS