Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It not work. The output is written to the original path #278

Open
Volaner opened this issue Mar 20, 2019 · 2 comments
Open

It not work. The output is written to the original path #278

Volaner opened this issue Mar 20, 2019 · 2 comments

Comments

@Volaner
Copy link

Volaner commented Mar 20, 2019

`$path = '/libraries';
require_once $path . '/minify/src/Minify.php';
require_once $path . '/minify/src/CSS.php';
require_once $path . '/minify/src/JS.php';
require_once $path . '/minify/src/Exception.php';
require_once $path . '/minify/src/Exceptions/BasicException.php';
require_once $path . '/minify/src/Exceptions/FileImportException.php';
require_once $path . '/minify/src/Exceptions/IOException.php';
require_once $path . '/path-converter/src/ConverterInterface.php';
require_once $path . '/path-converter/src/Converter.php';

use MatthiasMullie\Minify;

$sourcePath = '/media/js/my.js';
$minifier = new Minify\JS($sourcePath);

$minifiedPath = '/media/js/min.js';
$minifier->minify($minifiedPath);`

After launch I open min.js and see it:
/media/js/my.js

What's wrong i'm doing?

@inandi
Copy link

inandi commented Mar 21, 2019

$sourcePath = '/media/js/my.js';

will be (tested in Codeigniter framework )

$sourcePath = APPPATH.'/media/js/my.js';

try and comment.

@Volaner
Copy link
Author

Volaner commented Mar 27, 2019

So it is written here
#83

Maybe you will correct your documentation if it is not correct?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants