grunt-laravel
Grunt module for Laravel.
Features
- gruntfile import for workbench packages
Links
GitHub: https://github.com/Vitre/grunt-laravel
NPM: https://www.npmjs.org/package/grunt-laravel
Install
$ npm install grunt-laravel
Package gruntfile
[PACKAGE_ROOT]/Gruntfile.js
module { configsass = configsass || {}; configsasspkgname + "_dist" = "options": "style": "compressed" "compass": true "files": "expand": true "cwd": pkgresources + "/public/scss" "src": "*.scss" "dest": optionsweb + "/admin/@/css" "ext": ".css" ; configwatch = configwatch || {}; configwatchpkgname + "_sass" = files: pkgresources + "/public/scss/**/*.scss" tasks: "sass:" + pkgname + "_dist" ; };
Gruntfile implementation
/*global module:false*/ // grunt-laravel importvar gruntLaravel = ; module { // Base configuration. var config = // Metadata pkg: gruntfile // [...] Your tasks ; // Laravel packages import gruntLaravel; //--- grunt; // Modules grunt; grunt; // Tasks grunt; grunt; };
Gruntfile config registry
Task stores some information into global grunt config variable. You can use it for custom task creation.
config.laravel: { packages: {}, dist_tasks: [], dev_tasks: [] }
Task creation example
Package gruntfile
configlaraveldev_tasks;
Global gruntfile
grunt;
API
Importing
var gruntLaravel = ;
Methods
gruntLaravel.importPackages(grunt, config, [options])
Recursively imports packages Gruntfile.js
Options
public
Type: String
Default: 'public'
Public folder path.
workbench
Type: String
Default: 'workbench'
Resources path.
gruntFile
Type: String
Default: 'Gruntfile.js'
Package Gruntfile filename.
resources
Type: String
Default: 'src'
Package resources folder name.
Package object
Properties
name
Type: String
Package name.
name_camelcase
Type: String
Package name in camelcase.
name_underscore
Type: String
Package name in underscore format.
name_dashed
Type: String
Package name in dashed format.
name_public
Type: String
Package public name.
path
Type: String
Package path.
resources
Type: String
Package resources path.
public
Type: String
Package public path.
Release 0.0.2
- Package object new names (
name_dashed
,name_underscore
) - Grunt config
laravel
registryconfig.laravel: { packages: {...}, dist_tasks: [...], dev_tasks: [...] }