-1

I want to use a light css library pure. When I manually add it into my php/html file it works:

<head> 
<link rel="stylesheet" href="https://unpkg.com/purecss@1.0.1/build/pure-min.css" integrity="sha384-oAOxQR6DkCoMliIh8yFnu25d7Eq/PHS21PClpwjOTeU2jRSq11vu66rf90/cZr47" crossorigin="anonymous">
</head>

After I require it thru composer:

composer require yahoo/purecss

the composer indeed adds the library to my composer.json:

{
    "require": {
        "yahoo/purecss": "^1.0"
    }
}

But it does not work.

The autoload.php is included:

<?php session_start();  
include "vendor/autoload.php";

What's wrong?

Igor Savinkin
  • 5,669
  • 8
  • 37
  • 69
  • 2
    lemme get this straight .. you want to use composer, a PHP package manager to autoload the css? That's not how it works.. you still need to call it the same way you did with the `` - Composer deals with PHP - not CSS/HMTL (in terms of autoloading) – treyBake Nov 06 '19 at 13:27
  • @treyBake, thanks. You might make it an answer and I'll approve it. – Igor Savinkin Nov 06 '19 at 13:30
  • @IgorSavinkin `purecss` is the node module so it will not work with PHP composer. Follow this link https://github.com/pure-css/pure to install the node module if you are using node in your project. – Vinay Patil Nov 06 '19 at 13:32

1 Answers1

-1

Composer deals with PHP dependencies. Pure have made it installable via composer, but all that does is dump the files into your vendor folder. The rest will be up to you!

delboy1978uk
  • 12,118
  • 2
  • 21
  • 39