Skip to content

Commit

Permalink
n:srcset
Browse files Browse the repository at this point in the history
  • Loading branch information
janatjak committed Apr 23, 2018
1 parent 024895c commit a5458c6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -12,7 +12,7 @@ install:
- composer install --no-interaction --prefer-source

script:
- php vendor/bin/phpstan analyse ./src ./tests --level 7
- php vendor/bin/phpstan.phar analyse ./src ./tests --level 7
- php vendor/bin/phpcs --standard=PSR2 ./src ./tests
- php vendor/bin/tester tests -p phpdbg --coverage ./coverage.xml --coverage-src ./src

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Expand Up @@ -28,9 +28,9 @@
"require-dev": {
"nette/bootstrap": "~2.4",
"tracy/tracy": "~2.4",
"nette/tester": "dev-master",
"nette/tester": "~2.0",
"squizlabs/php_codesniffer": "^3.0",
"phpstan/phpstan": "~0.6"
"phpstan/phpstan-shim": "^0.9.2"
},
"autoload": {
"psr-4": {
Expand Down
3 changes: 3 additions & 0 deletions src/Latte/Macros.php
Expand Up @@ -30,6 +30,9 @@ public static function install(Compiler $compiler): void
$me->addMacro('src', null, null, function (MacroNode $node, PhpWriter $writer) use ($me) {
return ' ?> src="<?php ' . $me->macroSrc($node, $writer) . ' ?>"<?php ';
});
$me->addMacro('srcset', null, null, function (MacroNode $node, PhpWriter $writer) use ($me) {
return ' ?> srcset="<?php ' . $me->macroSrc($node, $writer) . ' ?>"<?php ';
});
}

/**
Expand Down
1 change: 1 addition & 0 deletions tests/config.neon
Expand Up @@ -3,6 +3,7 @@ extensions:
imagineGenerator: FreezyBee\NetteImagineGenerator\DI\ImagineGeneratorExtension

application:
scanDirs: false
catchExceptions: false

services:
Expand Down

0 comments on commit a5458c6

Please sign in to comment.