PHPackages                             mishak/web-resource-management - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. mishak/web-resource-management

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mishak/web-resource-management
==============================

Tools for management of scripts and styles (using Nette Framework)

1.4(13y ago)0642BSD-3-ClausePHPPHP &gt;=5.3.0

Since Nov 17Pushed 13y ago1 watchersCompare

[ Source](https://github.com/mishak87/web-resource-management)[ Packagist](https://packagist.org/packages/mishak/web-resource-management)[ RSS](/packages/mishak-web-resource-management/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (15)Used By (2)

Web Resource Management for Nette Framework
===========================================

[](#web-resource-management-for-nette-framework)

Main purpose is to simplify resource management of scripts and styles by moving their definition to configs (of modules) and automated generating of content.

**EXPERIMENTAL!** **BC breaks might occur.** This is still more of a draft then proper code so please bear with me.

Installation
------------

[](#installation)

Add to your `composer.json` requirement `"mishak/web-resource-management": "dev-master"`. Directory `%WWW_DIR%/generated` must be writable by server. Scripts must be under `%WWW_DIR%/js` directory for now.

### Bootstrap

[](#bootstrap)

```
$configurator = new Nette\Config\Configurator;
// after the line above
Mishak\WebResourceManagement\DI\WebResourceManagementExtension::register($configurator);
// before the line bellow
$container = $configurator->createContainer();

```

### In template

[](#in-template)

```

	...
	{include ../../libs/mishak/web-resource-management/@styles.latte}

	...
	{include ../../libs/mishak/web-resource-management/@scripts.latte}

```

Capabilities
------------

[](#capabilities)

- dependency management

### Scripts

[](#scripts)

- translations
- per script configuration
- using public, minified and raw version of script based on debugMode and config

### Styles

[](#styles)

- support for [less](http://lesscss.org/) (you must have `lessc` in path)
- extracting resources to new folders to prevent caching issues using new url
- renaming file to prevent caching issues
- generating of gzipped files - can be used by nginx using `gzip_static on;`

Usage
-----

[](#usage)

In config.neon:

```
resources:

	styles:
		bootstrap:
			filename: %appDir%/../libs/twitter/bootstrap/less/bootstrap.less
		bootstrap.responsive:
			filename: %appDir%/../libs/twitter/bootstrap/less/responsive.less
			depends: bootstrap

	scripts:
		jquery:
			filename: jquery-1.8.2.js
			public: //ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.js
		bootstrap:
			filename: bootstrap.js
			minified: bootstrap.min.js
			depends: jquery
		main:
			filename: main.js
			depends: [ jquery, bootstrap ]

```

- attribute `depends` is optional, defaults to empty array (`[ ]`)

### Scripts

[](#scripts-1)

- `minified` version is optional
- at least `filename` or `public` must be defined
- switching between is done automatically in this order (`productionMode = TRUE`) `public` &gt; `minified` &gt; `filename` (`debugMode = TRUE`)

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~11 days

Recently: every ~33 days

Total

14

Last Release

4776d ago

Major Versions

0.1.4 → 1.1.52012-11-26

PHP version history (2 changes)0.0.1PHP &gt;=5.4.0

0.0.2PHP &gt;=5.3.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/beeda758b87c543b137f64bdfa14cab916075403504b8b6a00609d06f08df96c?d=identicon)[mishak87](/maintainers/mishak87)

---

Top Contributors

[![mishak87](https://avatars.githubusercontent.com/u/276500?v=4)](https://github.com/mishak87 "mishak87 (34 commits)")

---

Tags

nettedependencystylemanagerresourcescripts

### Embed Badge

![Health badge](/badges/mishak-web-resource-management/health.svg)

```
[![Health](https://phpackages.com/badges/mishak-web-resource-management/health.svg)](https://phpackages.com/packages/mishak-web-resource-management)
```

###  Alternatives

[contributte/di

Extra contrib to nette/di

465.8M18](/packages/contributte-di)[cybercog/laravel-paket

Composer personal web interface. Manage Laravel dependencies without switching to command line!

1753.3k](/packages/cybercog-laravel-paket)[bileto/cronner

Simple tool which helps with maintenance of cron tasks.

752.1k](/packages/bileto-cronner)[vojtech-dobes/nette-forms-gpspicker

Google Maps based picker of coordinates for Nette Framework.

2456.6k](/packages/vojtech-dobes-nette-forms-gpspicker)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
