This repository has been archived by the owner on Mar 21, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
adb6ad5
commit 50e548d
Showing
5 changed files
with
127 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
#exclude files from export | ||
|
||
README.md export-ignore | ||
.gitattributes export-ignore | ||
.gitignore export-ignore | ||
language/*.po* export-ignore | ||
#exclude files from export | ||
|
||
README.md export-ignore | ||
.gitattributes export-ignore | ||
.gitignore export-ignore | ||
.gitmodules export-ignore | ||
.php_cs export-ignore | ||
.Gruntfile.js export-ignore | ||
.package.json export-ignore | ||
language/*.po* export-ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/node_modules/ | ||
/nbproject/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<?php | ||
|
||
/* | ||
* webtrees: online genealogy | ||
* Copyright (C) 2018 webtrees development team | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
// https://github.com/FriendsOfPHP/PHP-CS-Fixer | ||
|
||
$finder = PhpCsFixer\Finder::create() | ||
->in(__DIR__); | ||
|
||
return PhpCsFixer\Config::create() | ||
->setUsingCache(false) | ||
->setIndent("\t") | ||
->setFinder($finder) | ||
->setRiskyAllowed(true) | ||
->setRules([ | ||
// Mostly use PSR-2 ... | ||
'@PSR2' => true, | ||
|
||
// ... exceptions | ||
'braces' => [ | ||
'position_after_functions_and_oop_constructs' => 'same', | ||
], | ||
|
||
// ... additions | ||
'binary_operator_spaces' => [ | ||
'operators' => [ | ||
'===' => 'align_single_space_minimal', | ||
'!==' => 'align_single_space_minimal', | ||
'==' => 'align_single_space_minimal', | ||
'!=' => 'align_single_space_minimal', | ||
'=' => 'align_single_space_minimal', | ||
'=>' => 'align_single_space_minimal', | ||
], | ||
], | ||
|
||
'array_syntax' => [ | ||
'syntax' => 'short', | ||
], | ||
|
||
'concat_space' => [ | ||
'spacing' => 'one', | ||
], | ||
|
||
// Custom config @JustCarmen | ||
'no_unused_imports' => true, | ||
'single_line_after_imports' =>false, | ||
'line_ending' => false // to prevent mixed line endings | ||
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
module.exports = function(grunt) { | ||
|
||
// load all grunt tasks with this command. No need to set grunt.loadNpmTasks(...) for each task separately; | ||
require('load-grunt-tasks')(grunt); | ||
|
||
// output time table | ||
require('time-grunt')(grunt); | ||
|
||
// Project configuration. | ||
grunt.initConfig({ | ||
pkg: grunt.file.readJSON('package.json'), | ||
|
||
// ======================================================================================== | ||
// WATCH TASK | ||
// ======================================================================================== | ||
watch: { | ||
php: { | ||
files: ['*.php'], | ||
tasks: ['phpcsfixer'], | ||
options: { | ||
spawn: false | ||
} | ||
} | ||
}, | ||
|
||
// ======================================================================================== | ||
// PHP CS FIXER | ||
// | ||
// Source: https://github.com/FriendsOfPHP/PHP-CS-Fixer // | ||
// Configurator: https://mlocati.github.io/php-cs-fixer-configurator/ | ||
// ======================================================================================== | ||
|
||
phpcsfixer: { | ||
app: { | ||
dir: '' | ||
}, | ||
options: { | ||
bin: '../../vendor/bin/php-cs-fixer', | ||
configfile: '.php_cs', | ||
quiet: true | ||
} | ||
} | ||
}); // end of grunt configuration | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"private": true, | ||
"devDependencies": { | ||
"grunt": "^1.0.1", | ||
"grunt-contrib-watch": "^1.0.0", | ||
"grunt-php-cs-fixer": "^1.0.0", | ||
"load-grunt-tasks": "^3.5.2", | ||
"time-grunt": "^1.4.0" | ||
} | ||
} |