Skip to content

Commit e3fd7b2

Browse files
committed
Initial commit
0 parents  commit e3fd7b2

19 files changed

+460
-0
lines changed

.editorconfig

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
; This file is for unifying the coding style for different editors and IDEs.
2+
; More information at https://editorconfig.org
3+
4+
root = true
5+
6+
[*]
7+
charset = utf-8
8+
indent_size = 4
9+
indent_style = space
10+
end_of_line = lf
11+
insert_final_newline = true
12+
trim_trailing_whitespace = true
13+
14+
[*.md]
15+
trim_trailing_whitespace = false
16+
17+
[*.yml]
18+
indent_size = 2

.gitattributes

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Path-based git attributes
2+
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
3+
4+
# Ignore all test and documentation with "export-ignore".
5+
/.gitattributes export-ignore
6+
/.gitignore export-ignore
7+
/.travis.yml export-ignore
8+
/phpunit.xml.dist export-ignore
9+
/.scrutinizer.yml export-ignore
10+
/tests export-ignore
11+
/.editorconfig export-ignore

.github/FUNDING.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
patreon: spatie

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
build
2+
composer.lock
3+
docs
4+
vendor
5+
coverage

.scrutinizer.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
filter:
2+
excluded_paths: [tests/*]
3+
4+
checks:
5+
php:
6+
remove_extra_empty_lines: true
7+
remove_php_closing_tag: true
8+
remove_trailing_whitespace: true
9+
fix_use_statements:
10+
remove_unused: true
11+
preserve_multiple: false
12+
preserve_blanklines: true
13+
order_alphabetically: true
14+
fix_php_opening_tag: true
15+
fix_linefeed: true
16+
fix_line_ending: true
17+
fix_identation_4spaces: true
18+
fix_doc_comments: true
19+

.styleci.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
preset: laravel
2+
3+
disabled:
4+
- single_class_element_per_statement
5+
- self_accessor

.travis.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
language: php
2+
3+
php:
4+
- 7.3
5+
6+
env:
7+
matrix:
8+
- COMPOSER_FLAGS="--prefer-lowest"
9+
- COMPOSER_FLAGS=""
10+
11+
before_script:
12+
- travis_retry composer self-update
13+
- travis_retry composer update ${COMPOSER_FLAGS} --no-interaction --prefer-source
14+
15+
script:
16+
- vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
17+
18+
after_script:
19+
- php vendor/bin/ocular code-coverage:upload --format=php-clover coverage.clover

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Changelog
2+
3+
All notable changes to `:package_name` will be documented in this file
4+
5+
## 1.0.0 - 201X-XX-XX
6+
7+
- initial release

CONTRIBUTING.md

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Contributing
2+
3+
Contributions are **welcome** and will be fully **credited**.
4+
5+
Please read and understand the contribution guide before creating an issue or pull request.
6+
7+
## Etiquette
8+
9+
This project is open source, and as such, the maintainers give their free time to build and maintain the source code
10+
held within. They make the code freely available in the hope that it will be of use to other developers. It would be
11+
extremely unfair for them to suffer abuse or anger for their hard work.
12+
13+
Please be considerate towards maintainers when raising issues or presenting pull requests. Let's show the
14+
world that developers are civilized and selfless people.
15+
16+
It's the duty of the maintainer to ensure that all submissions to the project are of sufficient
17+
quality to benefit the project. Many developers have different skillsets, strengths, and weaknesses. Respect the maintainer's decision, and do not be upset or abusive if your submission is not used.
18+
19+
## Viability
20+
21+
When requesting or submitting new features, first consider whether it might be useful to others. Open
22+
source projects are used by many developers, who may have entirely different needs to your own. Think about
23+
whether or not your feature is likely to be used by other users of the project.
24+
25+
## Procedure
26+
27+
Before filing an issue:
28+
29+
- Attempt to replicate the problem, to ensure that it wasn't a coincidental incident.
30+
- Check to make sure your feature suggestion isn't already present within the project.
31+
- Check the pull requests tab to ensure that the bug doesn't have a fix in progress.
32+
- Check the pull requests tab to ensure that the feature isn't already in progress.
33+
34+
Before submitting a pull request:
35+
36+
- Check the codebase to ensure that your feature doesn't already exist.
37+
- Check the pull requests to ensure that another person hasn't already submitted the feature or fix.
38+
39+
## Requirements
40+
41+
If the project maintainer has any additional requirements, you will find them listed here.
42+
43+
- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](https://pear.php.net/package/PHP_CodeSniffer).
44+
45+
- **Add tests!** - Your patch won't be accepted if it doesn't have tests.
46+
47+
- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date.
48+
49+
- **Consider our release cycle** - We try to follow [SemVer v2.0.0](https://semver.org/). Randomly breaking public APIs is not an option.
50+
51+
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
52+
53+
- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](https://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting.
54+
55+
**Happy coding**!

LICENSE.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) Spatie bvba <info@spatie.be>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.md

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Very short description of the package
2+
3+
[![Latest Version on Packagist](https://img.shields.io/packagist/v/spatie/:package_name.svg?style=flat-square)](https://packagist.org/packages/spatie/:package_name)
4+
[![Build Status](https://img.shields.io/travis/spatie/:package_name/master.svg?style=flat-square)](https://travis-ci.org/spatie/:package_name)
5+
[![Quality Score](https://img.shields.io/scrutinizer/g/spatie/:package_name.svg?style=flat-square)](https://scrutinizer-ci.com/g/spatie/:package_name)
6+
[![Total Downloads](https://img.shields.io/packagist/dt/spatie/:package_name.svg?style=flat-square)](https://packagist.org/packages/spatie/:package_name)
7+
8+
**Note:** Replace ```:author_name``` ```:author_username``` ```:author_email``` ```:package_name``` ```:package_description``` with their correct values in [README.md](README.md), [CHANGELOG.md](CHANGELOG.md), [CONTRIBUTING.md](CONTRIBUTING.md), [LICENSE.md](LICENSE.md) and [composer.json](composer.json) files, then delete this line.
9+
10+
This is where your description should go. Try and limit it to a paragraph or two. Consider adding a small example.
11+
12+
## Installation
13+
14+
You can install the package via composer:
15+
16+
```bash
17+
composer require spatie/:package_name
18+
```
19+
20+
## Usage
21+
22+
``` php
23+
$skeleton = new Spatie\Skeleton();
24+
echo $skeleton->echoPhrase('Hello, Spatie!');
25+
```
26+
27+
### Testing
28+
29+
``` bash
30+
composer test
31+
```
32+
33+
### Changelog
34+
35+
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
36+
37+
## Contributing
38+
39+
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
40+
41+
### Security
42+
43+
If you discover any security related issues, please email freek@spatie.be instead of using the issue tracker.
44+
45+
## Postcardware
46+
47+
You're free to use this package, but if it makes it to your production environment we highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using.
48+
49+
Our address is: Spatie, Samberstraat 69D, 2060 Antwerp, Belgium.
50+
51+
We publish all received postcards [on our company website](https://spatie.be/en/opensource/postcards).
52+
53+
## Credits
54+
55+
- [:author_name](https://github.com/:author_username)
56+
- [All Contributors](../../contributors)
57+
58+
## Support us
59+
60+
Spatie is a webdesign agency based in Antwerp, Belgium. You'll find an overview of all our open source projects [on our website](https://spatie.be/opensource).
61+
62+
Does your business depend on our contributions? Reach out and support us on [Patreon](https://www.patreon.com/spatie).
63+
All pledges will be dedicated to allocating workforce on maintenance and new awesome stuff.
64+
65+
## License
66+
67+
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

composer.json

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"name": "spatie/:package_name",
3+
"description": ":package_description",
4+
"keywords": [
5+
"spatie",
6+
":package_name"
7+
],
8+
"homepage": "https://github.com/spatie/:package_name",
9+
"license": "MIT",
10+
"authors": [
11+
{
12+
"name": ":author_name",
13+
"email": ":author_email",
14+
"homepage": "https://spatie.be",
15+
"role": "Developer"
16+
}
17+
],
18+
"require": {
19+
"php": "^7.3"
20+
},
21+
"require-dev": {
22+
"symfony/var-dumper": "^4.3",
23+
"phpunit/phpunit": "^8.2"
24+
},
25+
"autoload": {
26+
"psr-4": {
27+
"Spatie\\Skeleton\\": "src"
28+
}
29+
},
30+
"autoload-dev": {
31+
"psr-4": {
32+
"Spatie\\Skeleton\\Tests\\": "tests"
33+
}
34+
},
35+
"scripts": {
36+
"test": "vendor/bin/phpunit",
37+
"test-coverage": "vendor/bin/phpunit --coverage-html coverage"
38+
39+
},
40+
"config": {
41+
"sort-packages": true
42+
},
43+
"extra": {
44+
"laravel": {
45+
"providers": [
46+
"Spatie\\Skeleton\\SkeletonServiceProvider"
47+
],
48+
"aliases": {
49+
"Skeleton": "Spatie\\Skeleton\\SkeletonFacade"
50+
}
51+
}
52+
}
53+
}

config/.gitkeep

Whitespace-only changes.

configure-skeleton.sh

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#!/bin/bash
2+
3+
git_name=`git config user.name`;
4+
git_email=`git config user.email`;
5+
6+
read -p "Author name ($git_name): " author_name
7+
author_name=${author_name:-$git_name}
8+
9+
read -p "Author email ($git_email): " author_email
10+
author_email=${author_email:-$git_email}
11+
12+
username_guess=${author_name//[[:blank:]]/}
13+
read -p "Author username ($username_guess): " author_username
14+
author_username=${author_username:-$username_guess}
15+
16+
current_directory=`pwd`
17+
current_directory=`basename $current_directory`
18+
read -p "Package name ($current_directory): " package_name
19+
package_name=${package_name:-$current_directory}
20+
21+
read -p "Package description: " package_description
22+
23+
echo
24+
echo -e "Author: $author_name ($author_username, $author_email)"
25+
echo -e "Package: $package_name <$package_description>"
26+
27+
echo
28+
echo "This script will replace the above values in all files in the project directory and reset the git repository."
29+
read -p "Are you sure you wish to continue? (n/y) " -n 1 -r
30+
31+
echo
32+
if [[ ! $REPLY =~ ^[Yy]$ ]]
33+
then
34+
[[ "$0" = "$BASH_SOURCE" ]] && exit 1 || return 1
35+
fi
36+
37+
echo
38+
39+
rm -rf .git
40+
git init
41+
42+
echo
43+
44+
find . -type f -exec sed -i '' -e "s/:author_name/$author_name/" {} \;
45+
find . -type f -exec sed -i '' -e "s/:author_username/$author_username/" {} \;
46+
find . -type f -exec sed -i '' -e "s/:author_email/$author_email/" {} \;
47+
find . -type f -exec sed -i '' -e "s/:package_name/$package_name/" {} \;
48+
find . -type f -exec sed -i '' -e "s/:package_description/$package_description/" {} \;
49+
50+
sed -i '' -e "/^\*\*Note:\*\* Replace/d" README.md
51+
52+
echo "Replaced all values and reset git directory, self destructing in 3... 2... 1..."
53+
54+
rm -- "$0"

phpunit.xml.dist

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit bootstrap="vendor/autoload.php"
3+
backupGlobals="false"
4+
backupStaticAttributes="false"
5+
colors="true"
6+
verbose="true"
7+
convertErrorsToExceptions="true"
8+
convertNoticesToExceptions="true"
9+
convertWarningsToExceptions="true"
10+
processIsolation="false"
11+
stopOnFailure="false">
12+
<testsuites>
13+
<testsuite name="Spatie Test Suite">
14+
<directory>tests</directory>
15+
</testsuite>
16+
</testsuites>
17+
<filter>
18+
<whitelist>
19+
<directory suffix=".php">src/</directory>
20+
</whitelist>
21+
</filter>
22+
<logging>
23+
<log type="tap" target="build/report.tap"/>
24+
<log type="junit" target="build/report.junit.xml"/>
25+
<log type="coverage-html" target="build/coverage"/>
26+
<log type="coverage-text" target="build/coverage.txt"/>
27+
<log type="coverage-clover" target="build/logs/clover.xml"/>
28+
</logging>
29+
</phpunit>

0 commit comments

Comments
 (0)