Создание критических CSS на проекте Codeigniter

Этот вопрос скорее теоретический, чем практический. Мне нужно создать критический путь для CSS на сайте. Я прочитал учебник по этому инструменту: https://github.com/addyosmani/critical, и я привожу здесь основной пример:

critical.generate({
    base: 'test/',
    src: 'index.html',
    dest: 'styles/main.css',
    width: 1300,
    height: 900
});

В моем случае у меня есть такая структура codeigniter:

application
-config
--config.php
--routes.php
--...
-controllers
--Matching.php
--...
-views
--home_matching.php
--page_about.php
--page_contact.php
--...
out
-bundle.min.css //this is the minified css visible in all views

route.php о домашней странице, странице о и контактах страницы:

$route['default_controller'] = 'Matching';
$route['about'] = 'Matching/about';
$route['contact-us'] = 'Matching/contactus';

Список методов в контроллере соответствия выглядит следующим образом:

class Matching extends CI_Controller{


public function __construct()
  {
    parent::__construct();
  }

  function index()
  {
    $this->load->view('home_matching.php');
  }

  function about()
  {
    $this->load->view('page_about.php');
  }

  function contactus()
  {
    $this->load->view('page_contact.php');
  }

Есть способ создать критический CSS с этой структурой?

0 ответов

Другие вопросы по тегам