Skip to content

Commit

Permalink
docs update
Browse files Browse the repository at this point in the history
  • Loading branch information
michalsn committed Dec 27, 2023
1 parent 09bc9c7 commit 6887cc9
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 13 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,9 @@ public $js = [
'jquery-3.7.1.min.js', 'bootstrap-3.3.7.min.js', 'main.js',
]
];
```

or
// or / and

```php
public $css = [
'all.min.css' => [
'bootstrap-3.3.7.min.css', 'font-awesome-4.7.0.min.css', 'main.css',
Expand Down
8 changes: 2 additions & 6 deletions docs/basic-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@ Now to generate a proper tag with desired file to load, you have to make a simpl

```php
minifier('all.min.js');
```

or
// or / and

```php
minifier('all.min.css');
```

Expand All @@ -29,11 +27,9 @@ This will produce:
```html
<script type="text/javascript"
src="http://localhost/assets/js/all.min.js?v=9ef881911da8d7c4a1c2f19c4878d122"></script>
```

or
<!-- or / and -->

```html
<link rel="stylesheet"
href="http://localhost/assets/css/all.min.css?v=50a35b0b1d1c3798aa556b8245314930">
```
4 changes: 2 additions & 2 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ We will get our copy ready for modifications.
Now, you should define an array of files that you want to minify, ie:

```php
public $js = [
public array $js = [
'all.min.js' => [
'jquery-3.7.1.min.js', 'bootstrap-3.3.7.min.js', 'main.js',
]
];

// or / and

public $css = [
public array $css = [
'all.min.css' => [
'bootstrap-3.3.7.min.css', 'font-awesome-4.7.0.min.css', 'main.css',
]
Expand Down
17 changes: 15 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,23 @@ Asset minification and versioning library for CodeIgniter 4.

## Overview

We can define files we want to combine and minify and then use it with only one line:
We can define files we want to combine and minify:

```php
public $js = [
'all.min.js' => ['file1.js', 'file2.js']
];
```

And then use it with only one line:

```php
echo minifier('all.min.js');
// <script src="http://localhost/assets/js/all.min.js?v=9ef881911da8d7c4a1c2f19c4878d122" type="text/javascript"></script>
```

This will return ready to use HTML tag:

```html
<script src="http://localhost/assets/js/all.min.js?v=9ef881911da8d7c4a1c2f19c4878d122" type="text/javascript"></script>
```

0 comments on commit 6887cc9

Please sign in to comment.