{"id":15021872,"url":"https://github.com/iulyanp/elixir-mix-bundle","last_synced_at":"2025-04-10T20:32:42.518Z","repository":{"id":49413141,"uuid":"79051914","full_name":"iulyanp/elixir-mix-bundle","owner":"iulyanp","description":"A Symfony bundle that integrates Laravel Mix","archived":false,"fork":false,"pushed_at":"2021-06-18T17:27:00.000Z","size":248,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-22T02:03:11.938Z","etag":null,"topics":["assets","laravel-mix","symfony","symfony-bundle","webpack"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iulyanp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-15T18:43:51.000Z","updated_at":"2021-07-15T10:20:30.000Z","dependencies_parsed_at":"2022-09-16T23:52:50.911Z","dependency_job_id":null,"html_url":"https://github.com/iulyanp/elixir-mix-bundle","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iulyanp%2Felixir-mix-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iulyanp%2Felixir-mix-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iulyanp%2Felixir-mix-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iulyanp%2Felixir-mix-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iulyanp","download_url":"https://codeload.github.com/iulyanp/elixir-mix-bundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248290041,"owners_count":21078923,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["assets","laravel-mix","symfony","symfony-bundle","webpack"],"created_at":"2024-09-24T19:57:09.972Z","updated_at":"2025-04-10T20:32:42.497Z","avatar_url":"https://github.com/iulyanp.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/iulyanp/elixir-mix-bundle.svg?branch=master)](https://travis-ci.org/iulyanp/elixir-mix-bundle)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/iulyanp/elixir-mix-bundle/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/iulyanp/elixir-mix-bundle/?branch=master)\n\nElixirMixBundle\n===================\n\n\u003e Note! Starting with Symfony 4 you can use the official webpack wrapper from Symfony: [Encore](https://symfony.com/doc/current/frontend/encore/installation.html).\nI also wrote a short blog post about how you can [Compile your assets with Symfony Encore](https://iulyanp.github.io/symfony/2017/06/18/symfony-encore/).\n\nElixirMixBundle is a Symfony bundle that integrates [Laravel Mix](https://github.com/JeffreyWay/laravel-mix). \nThe purpose of the bundle is to offer the `mix()` twig function. This is exactly the same `mix()` function from Laravel \nblade template system.\n\n### Requirements\n\nBefore you start installing this bundle you first have to ensure that Node.js and NPM are installed on your machine. \n\n## Installation\n\n### Step 1: Require the bundle with composer\n\nOpen your terminal and run one of the following commands to download the bundle into your vendor directory.\n\nIf you have composer installed globally you can run:\n```\n$ composer require iulyanp/elixir-mix-bundle\n```\nElse you can go with:\n```\n$ php composer.phar require iulyanp/elixir-mix-bundle\n```\n\n### Step 2: Register the bundle in your AppKernel class\n\nRegister the bundle in the app/AppKernel.php file of your project:\n\n```\n\u003c?php\n/** app/AppKernel.php */\n\nclass AppKernel extends Kernel\n{\n    public function registerBundles()\n    {\n        $bundles = array(\n\n            new Iulyanp\\ElixirMixBundle\\IulyanpElixirMixBundle(),\n        );\n    }\n}\n```\n\n### Step 3: Configure the bundle\nIn order to be able to use the bundle you have to give it some configuration specific to your application.\n\n```\n# config/parameters.yml\nparameters:\n    # ...\n    web_dir: \"%kernel.root_dir%/../web\"\n\n# config/config.yml\niulyanp_elixir_mix:\n    web_dir: \"%web_dir%\"\n```\nThe `web_dir` configuration is just the public path where you want the output for your assets to be saved. I used `web`\ndirectory from Symfony.\n\n### Step 4: Initialize larave-mix package\nIf you already have installed `Node.js`, `npm` you should be all set to run:\n\n```\n$ php bin/console mix:init\n```\n\nA base `package.json` and `webpack.mix.js` file will be generated into your project root directory.\n\nThen run `npm install` to install all the dependencies and [laravel-mix](https://github.com/JeffreyWay/laravel-mix).\n\n### Usage\nNow you can use mix() function to version a file like this:\n```\n\u003clink rel=\"stylesheet\" type=\"text/css\" href=\"{{ mix('css/app.css') }}\" /\u003e\n```\nYou can find more about laravel mix usage on the [official documentation](https://github.com/JeffreyWay/laravel-mix/tree/master/docs#summary)\n\n### License\nThe ElixirMixBundle is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiulyanp%2Felixir-mix-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiulyanp%2Felixir-mix-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiulyanp%2Felixir-mix-bundle/lists"}