Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
laravel-elixir-wiredep
Advanced tools
#Laravel-Elixir-Wiredep
This is a simple wrapper around Laravel Elixir for Wiredep.
Install the module with npm:
$ npm install --save laravel-elixir-wiredep
And add it to your Elixir-enhanced Gulpfile, like so:
var elixir = require('laravel-elixir');
require('laravel-elixir-wiredep');
elixir(function(mix) {
mix.wiredep();
});
Then you just have to edit your php file(s) and some extra markup, like this:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<!-- bower:css -->
<!-- endbower -->
</head>
<body>
<!-- bower:js -->
<!-- endbower -->
</body>
</html>
This will scan your Bower dependencies on bower.json
and inject them in all your .php
files inside resources/views/
directory. Instead, if you only want to inject dependencies on a single file, you may do:
mix.wiredep({src: 'master.blade.php'})
If you run gulp watch this will also watch your bower.json
for any changes and inject them automatically.
Whenever you install a new bower package with the -S
command your php files will be updated.
Since Wiredep serves bower components, these must inside the public folder.
Just create a .bowerrc
file in the root of your project folder and specify the destination folder inside the public folder, like so:
{
"directory" : "public/bower_components"
}
This wrapper accepts two objects with configurations, the first one is for the wrapper itself and second one is for the Wiredep package you can get more info here
These are the default wrapper options:
{
baseDir: 'resources/views/', //the folder for your views
src: false, //if you just want to inject dependencies on one file just specify it's source, relative to baseDir
searchLevel: '**/*.php', //How many search levels you want
}
This is an example of a Gulp file that Wiredeps only your javascript dependencies and compiles your custom Sass file into the resources/views/master.blade.php
:
var elixir = require('laravel-elixir');
require('laravel-elixir-wiredep');
var paths = {
'bootstrap': './public/bower_components/bootstrap-sass-official/assets/'
}
elixir(function(mix) {
mix.sass('main.scss', 'public/css/', {includePaths: [paths.bootstrap + 'stylesheets/']})
.wiredep({src: 'master.blade.php'});
});
FAQs
Laravel Elixir Wiredep extension
The npm package laravel-elixir-wiredep receives a total of 0 weekly downloads. As such, laravel-elixir-wiredep popularity was classified as not popular.
We found that laravel-elixir-wiredep demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.