2017 © Pedro Peláez
 

library toolkit

ABetter blade toolkit

image

abetter/toolkit

ABetter blade toolkit

  • Thursday, June 14, 2018
  • by abetter
  • Repository
  • 1 Watchers
  • 0 Stars
  • 27 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

A Better Toolkit

Packagist Version Latest Stable Version Total Downloads License, (*1)

ABetter Toolkit is a package of new and modified directives for faster development of component-based web applications, with focus on scalable static caching., (*2)


Requirements

  • PHP 7.2+
  • Imagick 3+
  • MySQL 5.7+
  • Composer 1.6+
  • Laravel 5.8+
  • Deployer 6+
  • Node 10.0+
  • NPM 6.4+

Installation

Via Composer:, (*3)

composer require abetter/toolkit

Laravel modifications

Add middleware to app/Http/Kernel.php:, (*4)

protected $middleware = [
    \ABetter\Toolkit\SandboxMiddleware::class,
];

Note: The middleware helps Blade clear the view cache when developing many nested components., (*5)


Directives

@component : Improved directive for injecting components

@component('<view.name>',[<variables>])
@component('<view.name>',TRUE)
@component('<view.name>') <slot-here> @endcomponent

Component names will be auto-resolved if the blade file has same basename as folder., (*6)

You can auto-terminate a @component with TRUE as the second paramater, to avoid writing out @endcomponent, e.g when not using any slots or nested content., (*7)

@inject : Improved directive for injecting class as variable

@inject('<variable>','<relative-class-file>')
@inject('Menu','Menu.class.php')
@inject('Menu')

Class-files will be auto-resolved if it's located in the component folder., (*8)

@block : Insert wrapped block section

@block('<class-name>')
@block('block--typography')
@endblock

@style : Embedd sass/css in html source code

@style('<relative-filename>')
@style('menu.scss')

Embedded Sass/CSS files will be rendered as external files in development mode to support browsersync live, but will be embedded in html source on Stage/Production for better caching., (*9)

@script : Embedd js in html source code

@script('<relative-filename>')
@script('menu.js')

Embedded JS files will be rendered as external files in development mode to support browsersync live, but will be embedded in html source on Stage/Production for better caching., (*10)

@svg : Embedd svg in html source code

@svg('<filename-relative-to-resources>')
@svg('/images/logo.svg')

@lipsum : Insert mockup text

@lipsum('<variables>')
@lipsum('medium')

@pixsum : Insert mockup image

@pixsum('<variables>','<options>')
@pixsum('photo:tech')
@pixsum('photo:tech','img:w500')
@logosum('<variables>')
@logosum('My Brand Name')

Contributors

Johan Sjöland johan@sjoland.com
Senior Product Developer: ABetter Story Sweden AB., (*11)

License

MIT license. Please see the license file for more information., (*12)

The Versions

14/06 2018

dev-master

9999999-dev

ABetter blade toolkit

  Sources   Download

MIT

The Requires

 

by Johan Sjoland

14/06 2018

1.0.5

1.0.5.0

ABetter blade toolkit

  Sources   Download

MIT

The Requires

 

by Johan Sjoland

13/06 2018

1.0.4

1.0.4.0

ABetter blade toolkit

  Sources   Download

MIT

The Requires

 

by Johan Sjoland

05/06 2018

1.0.3

1.0.3.0

ABetter blade toolkit

  Sources   Download

MIT

The Requires

 

by Johan Sjoland

04/06 2018

1.0.2

1.0.2.0

ABetter blade toolkit

  Sources   Download

MIT

The Requires

 

by Johan Sjoland

03/06 2018

1.0.1

1.0.1.0

ABetter blade toolkit

  Sources   Download

MIT

The Requires

 

by Johan Sjoland

31/05 2018

1.0.0

1.0.0.0

ABetter blade toolkit

  Sources   Download

MIT

The Requires

 

by Johan Sjoland