regularjack / frontend-bundle
A modern frontend development workflow for Symfony apps
Installs: 22 419
Dependents: 0
Suggesters: 0
Security: 0
Stars: 30
Watchers: 3
Forks: 3
Type:symfony-bundle
Requires
- php: >=5.4
- symfony/asset: ~2.7|~3.0
- symfony/config: ~2.7|~3.0
- symfony/console: ~2.7|~3.0
- symfony/dependency-injection: ~2.7|~3.0
- symfony/event-dispatcher: ~2.7|~3.0
- symfony/framework-bundle: ~2.7|~3.0
- symfony/http-kernel: ~2.7|~3.0
- symfony/process: ~2.7|~3.0
- symfony/templating: ~2.7|~3.0
Requires (Dev)
- matthiasnoback/symfony-config-test: ~1.4
- matthiasnoback/symfony-dependency-injection-test: ~0.7
- phpunit/phpunit: >=4.2
- symfony/browser-kit: ^2.7|~3.0
- symfony/filesystem: ~2.7|~3.0
- symfony/http-foundation: ~2.7|~3.0
- symfony/phpunit-bridge: ~2.7|~3.0
- symfony/routing: ~2.7|~3.0
- symfony/var-dumper: ~2.7|~3.0
README
A modern frontend development workflow for Symfony apps.
DEPRECATED
This project is deprecated. Use Webpack Encore instead.
Webpack Encore is a simpler way to integrate Webpack into your Symfony application. It wraps Webpack, giving you a clean & powerful API for bundling JavaScript modules, pre-processing CSS & JS and compiling and minifying assets.
There used to be a time where Symfony had no first-class support for a modern frontend development workflow, which was the problem this bundle was trying to solve. With Webpack Encore that is no longer the case so there is no reason for this bundle to continue to exist. Webpack Encore does it better and is the officially recommended way to integrate frontend technologies into Symfony applications.
Symfony comes packaged with Assetic for managing frontend assets like CSS, JavaScript or images. Assetic is great to quickly start a project but, as applications grow, its limitations start to show.
It has thus become more and more common to integrate tools native to frontend development into Symfony projects (bower
, gulp
, webpack
, livereload
, etc). However, setting up a seamless frontend development workflow is not easy and developers must repeat themselves every time they start a new project.
There are several tools out there that make it easier to do this but they come with their own limitations and many are wrappers for the native frontend development tools. Developers should be able to use the native tools directly and have them just work within their Symfony projects.
This bundle attempts to be the go-to solution for quickly, easily and cleanly setting up a tailored frontend development workflow in Symfony projects.
Supports PHP 5.4+, Symfony 2.7+
Features
- Asset pipeline
- Use Symfony's native calls to reference assets
<script src="{{ asset('js/foo.js') }}"></script>
- No need to clutter your Twig templates with boundaries for the asset pipeline
- Assets are automatically cache-busted in production
- Fast development
- Fast rebuilds make for an efficient workflow
- Only changed files are processed
- No more slow refreshes due to Assetic
- Livereload
- Browser updates when you save a file
- Change the CSS, the browser instantaneously updates, without a page reload
- Bower
- Frontend dependencies are a
bower install
away - No more vendor code in your repository
- Automatically generates
vendor.js
andvendor.css
files from yourbower.json
- Frontend dependencies are a
- Cache busting
- Automatically add a version to assets when in production
- No more need to set a version on every deploy
- An asset's version only changes if its content changed