Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMediocresTestAccount committed Aug 29, 2022
0 parents commit 24bbe52
Show file tree
Hide file tree
Showing 18 changed files with 8,909 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
vendor/
.idea/
util/node_modules/
14 changes: 14 additions & 0 deletions .phpcs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0"?>
<ruleset name="Ghwp Custom Standard" namespace="Ghwp\CS\Standard">

<file>./src</file>
<exclude-pattern type="relative">^__deprecated__</exclude-pattern>
<arg name="colors"/>
<rule ref="PSR12">
<!-- Prettier will handle these things -->
<exclude name="Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis"/>
<exclude name="Generic.Files.LineLength.TooLong"/>
<exclude name="Generic.WhiteSpace.ScopeIndent.IncorrectExact"/>
<exclude name="Squiz.ControlStructures.ForEachLoopDeclaration.SpacingBeforeAs"/>
</rule>
</ruleset>
6 changes: 6 additions & 0 deletions .phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
parameters:
level: 9
paths:
- src/
includes:
- vendor/szepeviktor/phpstan-wordpress/extension.neon
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"singleQuote": true,
"tabWidth": 4,
"useTabs": false,
"phpVersion": "7.4",
"trailingCommaPHP": true
}
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
test: lint

# Run basic linting with prettier & phpstan
lint:
@cd util/ \
&& . $$NVM_DIR/nvm.sh && nvm use \
&& npm i \
&& npm run lint
@composer lint

# Make prettier process and fix all files in src/
prettier:
@cd util/ \
&& . $$NVM_DIR/nvm.sh && nvm use \
&& npm i \
&& npx prettier -w --config ../.prettierrc ../src

# Create a tagged release to publish a new version of the package
release: lint
@cd util/ \
&& . $$NVM_DIR/nvm.sh && nvm use \
&& npm i \
&& npm run release


5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Sillynet Adretto-Twig

_Easily use Twig templates in Wordpress with [sillynet/adretto](https://github.com/asillywalk/adretto)._

---
40 changes: 40 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name": "sillynet/adretto-twig",
"description": "Easily use Twig templates in Wordpress with sillynet/adretto",
"type":"library",
"version": "0.0.0",
"require": {
"php": ">=7.4",
"twig/twig": "^3.3",
"sillynet/adretto": "^0.1.0"
},
"license": "GPL-3.0-only",
"authors": [
{
"name": "andi",
"email": "andi@asillywalk.de"
}
],
"minimum-stability": "stable",
"autoload": {
"psr-4": {
"Sillynet\\Adretto\\WpTwig\\": "src"
},
"files": [
"globals/template-functions.php"
]
},
"scripts": {
"lint": [
"@phpstan",
"@phpcs"
],
"phpstan": "phpstan analyse -c .phpstan.neon",
"phpcs": "phpcs -s"
},
"require-dev": {
"phpstan/phpstan": "^1.8",
"squizlabs/php_codesniffer": "^3.7",
"szepeviktor/phpstan-wordpress": "^1.1"
}
}
Loading

0 comments on commit 24bbe52

Please sign in to comment.