Skip to content

Bump decode-uri-component from 0.2.0 to 0.2.2 in /Resources/gulp #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/vendor/
logs/
.idea/
.phpunit.result.cache
.phpunit.result.cache
22 changes: 5 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
language: php

php:
- 5.5
- 5.6
- 7.2
- hhvm

matrix:
fast_finish: true
include:
- php: 5.6
env: SYMFONY_VERSION=2.6.*
- php: 5.6
env: SYMFONY_VERSION=2.7.*
- php: 5.6
env: SYMFONY_VERSION=2.8.*
allow_failures:
- php: hhvm

Expand All @@ -25,16 +17,12 @@ cache:

before_install:
- composer selfupdate
- if [ "$SYMFONY_VERSION" != "" ]; then composer require "symfony/symfony:${SYMFONY_VERSION}" --no-update; fi;

install: composer update --prefer-dist --no-interaction $COMPOSER_FLAGS
install: composer install --prefer-dist --no-interaction $COMPOSER_FLAGS

script:
- phpunit --coverage-text --coverage-clover=coverage.clover
- ./vendor/phpunit/phpunit/phpunit --coverage-text --coverage-clover=coverage.clover

after_script:
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover

notifications:
email: [email protected]
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
1 change: 0 additions & 1 deletion Controller/DataTableController.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php


namespace CrossKnowledge\DataTableBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
Expand Down
72 changes: 36 additions & 36 deletions DataTable/Renderer/TwigRenderer.php
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
<?php
namespace CrossKnowledge\DataTableBundle\DataTable\Renderer;
use CrossKnowledge\DataTableBundle\DataTable\Table\AbstractTable;
use Twig\Environment;
class TwigRenderer implements RendererInterface
{
/** @var Environment */
protected $twig;
/**
* TwigRenderer constructor
*
* @param Environment $env
*/
public function __construct(Environment $env)
{
$this->twig = $env;
}
public function render(AbstractTable $table)
{
$tableOptions = $table->getOptions();
$data = [
'columns' => $table->getClientSideColumns(),
'datatable' => $table,
];
if ($tableOptions['has_filter_form'])
{
$data['filterForm'] = $table->getFilterForm()->createView();
}
return $this->twig->loadTemplate($tableOptions['template'])->render($data);
}
}
<?php

namespace CrossKnowledge\DataTableBundle\DataTable\Renderer;

use CrossKnowledge\DataTableBundle\DataTable\Table\AbstractTable;
use Twig\Environment;

class TwigRenderer implements RendererInterface
{
/** @var Environment */
protected $twig;

/**
* TwigRenderer constructor
*
* @param Environment $env
*/
public function __construct(Environment $env)
{
$this->twig = $env;
}

public function render(AbstractTable $table)
{
$tableOptions = $table->getOptions();
$data = [
'columns' => $table->getClientSideColumns(),
'datatable' => $table
];
if ($tableOptions['has_filter_form'])
{
$data['filterForm'] = $table->getFilterForm()->createView();
}
return $this->twig->loadTemplate($tableOptions['template'])->render($data);
}
}
2 changes: 1 addition & 1 deletion DataTable/Table/AbstractTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ public function getFilterForm()
if (null===$this->filterForm) {
$this->filterForm = $this->buildFilterForm(
$this->formFactory->createNamedBuilder($this->getTableId().'_filter')
->add('dofilter', 'button')
->add('dofilter', \Symfony\Component\Form\Extension\Core\Type\ButtonType::class)
)->getForm();
}

Expand Down
9 changes: 9 additions & 0 deletions Resources/gulp/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"presets": [
"@babel/react",
"@babel/env"
],
"plugins": [
"@babel/plugin-proposal-class-properties"
]
}
2 changes: 1 addition & 1 deletion Resources/gulp/bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
"bower_components"
],
"dependencies": {
"datatables": "1.10.10"
"datatables.net": "1.11.5"
}
}
28 changes: 9 additions & 19 deletions Resources/gulp/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var debug = require('gulp-debug');
var plumber = require('gulp-plumber');
var minifyCss = require('gulp-minify-css');
var rename = require('gulp-rename');
var sass = require('gulp-sass');
var sass = require('gulp-sass')(require('sass'));

var browserify = require('browserify');
var babelify = require('babelify');
Expand Down Expand Up @@ -45,7 +45,7 @@ gulp.task('scripts-ie8', function () {

var tmpFile = moduleconfig.tmp + '/main.js';

return browserify(tmpFile, {debug: true}).transform("babelify", {presets: ["es2015"]})
return browserify(tmpFile, {debug: true}).transform("babelify", {presets: ["@babel/env"]})
.bundle().on('error', function (err) {
gutil.log('Error in ' + tmpFile + ':');
gutil.log(gutil.colors.red(err));
Expand All @@ -59,7 +59,7 @@ gulp.task('scripts-ie8', function () {
gulp.task('scripts-other', function () {
var sourceFile = moduleconfig.srcRoot + '/scripts/main.js';

return browserify(sourceFile, {debug: true}).transform("babelify", {presets: ["es2015"]})
return browserify(sourceFile, {debug: true}).transform("babelify", {presets: ["@babel/env"]})
.bundle().on('error', function (err) {
gutil.log('Error in ' + sourceFile + ':');
gutil.log(gutil.colors.red(err));
Expand All @@ -73,8 +73,7 @@ gulp.task('scripts-other', function () {
});


gulp.task('scripts', ['scripts-ie8', 'scripts-other']);

gulp.task('scripts', gulp.series('scripts-ie8', 'scripts-other'));

gulp.task('standalone-libs', function() {
var standaloneVendors = ['datatables'];
Expand Down Expand Up @@ -109,20 +108,9 @@ gulp.task('sass', function () {
.pipe(gulp.dest(moduleconfig.compiledRoot + '/css'))
});

gulp.task('build', function (callback) {
runSequence(
'clean',
'clean-tmp',
['sass', 'scripts', 'standalone-libs'],
'clean-tmp',
callback
);
}
);

gulp.task('watch', function () {
gulp.watch(moduleconfig.styles, ['sass']);
gulp.watch(moduleconfig.scripts, ['scripts']);
gulp.watch(moduleconfig.styles, gulp.series('sass'));
gulp.watch(moduleconfig.scripts, gulp.series('scripts'));
});

gulp.task('clean', function () {
Expand All @@ -137,4 +125,6 @@ gulp.task('clean-tmp', function () {
});
});

gulp.task('default', ['build', 'watch']);
gulp.task('build', gulp.series('clean', 'clean-tmp', ['sass', 'scripts', 'standalone-libs'], 'clean-tmp'));

gulp.task('default', gulp.series('build', 'watch'));
Loading