Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/roliod/codeigniter-asset-versioning
Simple Asset Versioning in Codeigniter
https://github.com/roliod/codeigniter-asset-versioning
assets assets-management codeigniter
Last synced: 2 days ago
JSON representation
Simple Asset Versioning in Codeigniter
- Host: GitHub
- URL: https://github.com/roliod/codeigniter-asset-versioning
- Owner: roliod
- License: mit
- Created: 2018-04-30T12:02:37.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-18T10:42:22.000Z (about 6 years ago)
- Last Synced: 2024-11-14T14:23:04.961Z (5 days ago)
- Topics: assets, assets-management, codeigniter
- Language: PHP
- Homepage: https://packagist.org/packages/roliod/codeigniter-asset-versioning
- Size: 12.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# codeigniter-asset-versioning
This package can be used to force browser refresh of assets when cached in the users browser utilising an asset versioning technique. The version number used is the assets last modified timestamp.## Installation
Installing Composer..
```
$ curl -sS https://getcomposer.org/installer | php
$ sudo mv composer.phar /usr/local/bin/composer
```
_You are not obliged to move the `composer.phar` file to your `/usr/local/bin`, it is however considered easy to have an global installation._Add the following to your require block in `composer.json` config
```json
"roliod/codeigniter-asset-versioning": "^1.0"
```__If your new to composer and have no clue what I'm talking about__
Just create a file named `composer.json` in your document root:
```json
{
"require": {
"roliod/codeigniter-asset-versioning": "^1.0"
}
}
```Now let's install the package:
```
composer install
```You can also install by using:
```
composer require roliod/codeigniter-asset-versioning
```Lastly, run this command when the package has been successfully installed:
```
php vendor/roliod/codeigniter-asset-versioning/install.php
```
That's all !## Installation (Manual)
* copy src/helpers/asset_helper.php to application/config
* copy src/libraries/asset.php to application/libraries## Configuration (Autoload)
The autoload file is located at application/config/
* add 'asset' to libraries
* add 'asset' to helpers`$autoload['libraries'] = array('asset');`
`$autoload['helpers'] = array('asset');`
## Configuration (Config)
The config file is located at application/config/
* add a 'base_url' config
`$config['base_url'] = 'https://mywebsite.com'`
## Usage
* CSS: ``
* JS: ``