Skip to content

Instantly share code, notes, and snippets.

@jasny
Last active Aug 14, 2018
Embed
What would you like to do?
New PHP library

Jasny {{library}}

Build Status Scrutinizer Code Quality Code Coverage SensioLabsInsight BCH compliance Packagist Stable Version Packagist License

Installation

composer require jasny/{{library}}
{
"name": "jasny/{{library}}",
"description": "",
"keywords": [],
"license": "MIT",
"authors": [
{
"name": "Arnold Daniels",
"email": "arnold@jasny.net",
"homepage": "http://www.jasny.net"
}
],
"support": {
"issues": "https://github.com/jasny/{{library}}/issues",
"source": "https://github.com/jasny/{{library}}"
},
"require": {
"php": ">=7.1.0"
},
"require-dev": {
"jasny/php-code-quality": "^2.3"
},
"autoload": {
"psr-4": {
"Jasny\\{{library}}\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Jasny\\{{library}}\\Tests": "tests/"
}
},
"scripts": {
"test": [
"phpunit",
"phpcs -p",
"phpstan analyse"
]
}
}
sed -i 's/{{library}}/'$(pwd | xargs basename)'/' README.md
sed -i 's/{{library}}/'$(pwd | xargs basename)'/' composer.json
mkdir -p src tests
composer install
cp vendor/jasny/php-code-quality/.gitignore .
cp vendor/jasny/php-code-quality/phpunit.xml.dist .
cp vendor/jasny/php-code-quality/phpcs.xml.dist ./phpcs.xml
cp vendor/jasny/php-code-quality/phpstan.neon.dist ./phpstan.neon
cp vendor/jasny/php-code-quality/travis.yml.dist ./.travis.yml
cp vendor/jasny/php-code-quality/bettercodehub.yml.dist ./.bettercodehub.yml
git add .
git commit -a -m "Initial commit"
git push
travis sync
travis enable
xdg-open https://scrutinizer-ci.com/g/new
xdg-open https://insight.sensiolabs.com/projects/new/github
xdg-open https://bettercodehub.com/repositories
xdg-open README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment