Initial commit
Test / test_all (push) Successful in 41s
Details
Test / test_all (push) Successful in 41s
Details
commit
38a6f15a82
|
@ -0,0 +1,29 @@
|
|||
name: Test
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
test_all:
|
||||
runs-on: ubuntu-22.04
|
||||
container: git.gertjankrol.nl/docker/php-toolkit:latest
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v3
|
||||
- name: composer install
|
||||
run: composer install --profile
|
||||
- name: phpunit
|
||||
run: composer unit
|
||||
- name: phplint
|
||||
run: composer lint
|
||||
- name: phpcs
|
||||
run: composer style
|
||||
- name: composer require check
|
||||
run: composer require-check
|
||||
- name: composer security check
|
||||
run: composer security-check
|
||||
- name: composer unused package check
|
||||
run: composer unused-check
|
||||
- name: composer normalize check
|
||||
run: composer normalize --dry-run
|
|
@ -0,0 +1,8 @@
|
|||
/.idea/
|
||||
/node_modules/
|
||||
/vendor/
|
||||
composer.lock
|
||||
package-lock.json
|
||||
*cache*
|
||||
*.log
|
||||
*.tmp
|
|
@ -0,0 +1,8 @@
|
|||
path: ./
|
||||
jobs: 10
|
||||
cache: cache/phplint
|
||||
extensions:
|
||||
- php
|
||||
exclude:
|
||||
- vendor
|
||||
warning: false
|
|
@ -0,0 +1,7 @@
|
|||
# Changelog
|
||||
All notable changes to this package will be documented in this file
|
||||
|
||||
## Unreleased
|
||||
|
||||
## 1.0.0 - 202X-XX-XX
|
||||
- Initial release [major]
|
|
@ -0,0 +1,53 @@
|
|||
# Contributing
|
||||
|
||||
Contributions are **welcome** and will be fully **credited**.
|
||||
|
||||
Please read and understand the contribution guide before creating an issue or pull request.
|
||||
|
||||
## Etiquette
|
||||
|
||||
This project is open source, and as such, the maintainers give their free time to build and maintain the source code
|
||||
held within. They make the code freely available in the hope that it will be of use to other developers. It would be
|
||||
extremely unfair for them to suffer abuse or anger for their hard work.
|
||||
|
||||
Please be considerate towards maintainers when raising issues or presenting pull requests. Let's show the
|
||||
world that developers are civilized and selfless people.
|
||||
|
||||
It's the duty of the maintainer to ensure that all submissions to the project are of sufficient
|
||||
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.
|
||||
|
||||
## Viability
|
||||
|
||||
When requesting or submitting new features, first consider whether it might be useful to others. Open
|
||||
source projects are used by many developers, who may have entirely different needs to your own. Think about
|
||||
whether or not your feature is likely to be used by other users of the project.
|
||||
|
||||
## Procedure
|
||||
|
||||
Before filing an issue:
|
||||
|
||||
- Attempt to replicate the problem, to ensure that it wasn't a coincidental incident.
|
||||
- Check to make sure your feature suggestion isn't already present within the project.
|
||||
- Check the pull requests tab to ensure that the bug doesn't have a fix in progress.
|
||||
- Check the pull requests tab to ensure that the feature isn't already in progress.
|
||||
|
||||
Before submitting a pull request:
|
||||
|
||||
- Check the codebase to ensure that your feature doesn't already exist.
|
||||
- Check the pull requests to ensure that another person hasn't already submitted the feature or fix.
|
||||
|
||||
## Requirements
|
||||
|
||||
- **Follow the [Crawl Coding Standard](https://git.gertjankrol.nl/crawl/coding-standard)** - Basically run `composer style` before committing/pushing.
|
||||
|
||||
- **Add tests!**
|
||||
|
||||
- **Document any change in behaviour** - Make sure the `CHANGELOG.md`, `README.md` and any other relevant documentation are kept up-to-date.
|
||||
|
||||
- **Consider our release cycle** - We try to follow [SemVer v2.0.0](https://semver.org/). Randomly breaking public APIs is not an option.
|
||||
|
||||
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
|
||||
|
||||
- **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.
|
||||
|
||||
**Happy coding**!
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2023 - Gertjan Krol
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -0,0 +1,48 @@
|
|||
# Vertumnus Laravel package skeleton
|
||||
|
||||
[![Latest Version on Packagist](https://img.shields.io/packagist/v/vertumnus/skeleton.svg?style=flat-square)](https://packagist.org/packages/vertumnus/skeleton)
|
||||
[![Total Downloads](https://img.shields.io/packagist/dt/vertumnus/skeleton.svg?style=flat-square)](https://packagist.org/packages/vertumnus/skeleton)
|
||||
|
||||
This is where your description should go. Try and limit it to a paragraph or two, and maybe throw in a mention of what PSRs you support to avoid any confusion with users and contributors.
|
||||
|
||||
## Installation
|
||||
|
||||
You can install the package via composer:
|
||||
|
||||
```bash
|
||||
composer require vertumnus/skeleton
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```php
|
||||
// Usage description here
|
||||
```
|
||||
|
||||
### Testing
|
||||
- Run PHPUnit: `composer unit`
|
||||
- Run PHPLint: `composer lint`
|
||||
- Run PHPCS/PHPCBF: `composer style`/`composer fix-style`
|
||||
- Run require checker: `composer require-check`
|
||||
- Run security checker: `composer security-check`
|
||||
- Check for unused packages: `composer unused-check`
|
||||
- **Run all tests: `composer test-all`**
|
||||
|
||||
### Changelog
|
||||
|
||||
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
|
||||
|
||||
## Contributing
|
||||
|
||||
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
|
||||
|
||||
### Security
|
||||
|
||||
If you discover any security related issues, please email security@gkcld.net instead of using the issue tracker.
|
||||
|
||||
## Authors
|
||||
- [Gertjan Krol](https://git.gertjankrol.nl/gertjan)
|
||||
|
||||
## License
|
||||
|
||||
The MIT License (MIT). Please see [LICENSE](LICENSE.md) for more information.
|
|
@ -0,0 +1,79 @@
|
|||
{
|
||||
"name": "vertumnus/skeleton",
|
||||
"description": "Vertumnus Laravel package skeleton",
|
||||
"license": "MIT",
|
||||
"type": "library",
|
||||
"keywords": [
|
||||
"vertumnus",
|
||||
"laravel",
|
||||
"skeleton"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Gertjan Krol",
|
||||
"email": "contact@gertjankrol.nl"
|
||||
}
|
||||
],
|
||||
"homepage": "https://git.gertjankrol.nl/vertumnus/skeleton",
|
||||
"require": {
|
||||
"php": "^8.2",
|
||||
"laravel/framework": "^10.21"
|
||||
},
|
||||
"require-dev": {
|
||||
"crawl/coding-standard": "^1.1",
|
||||
"enlightn/security-checker": "^1.10",
|
||||
"ergebnis/composer-normalize": "^2.35",
|
||||
"icanhazstring/composer-unused": "^0.8",
|
||||
"maglnet/composer-require-checker": "^4.6",
|
||||
"mockery/mockery": "^1.6",
|
||||
"orchestra/testbench": "^8.10",
|
||||
"overtrue/phplint": "^9.0",
|
||||
"phpunit/phpunit": "^10.3"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Vertumnus\\Skeleton\\": "src"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"Vertumnus\\Skeleton\\Tests\\": "tests"
|
||||
}
|
||||
},
|
||||
"config": {
|
||||
"allow-plugins": {
|
||||
"dealerdirect/phpcodesniffer-composer-installer": true,
|
||||
"ergebnis/composer-normalize": true
|
||||
},
|
||||
"optimize-autoloader": true,
|
||||
"sort-packages": true
|
||||
},
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"aliases": {
|
||||
"Skeleton": "Vertumnus\\Skeleton\\SkeletonFacade"
|
||||
},
|
||||
"providers": [
|
||||
"Vertumnus\\Skeleton\\SkeletonServiceProvider"
|
||||
]
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"fix-style": "vendor/bin/phpcbf --standard=phpcs.xml",
|
||||
"lint": "vendor/bin/phplint ./ --exclude=vendor",
|
||||
"require-check": "vendor/bin/composer-require-checker check composer.json",
|
||||
"security-check": "vendor/bin/security-checker security:check composer.lock",
|
||||
"style": "vendor/bin/phpcs --standard=phpcs.xml",
|
||||
"test-all": [
|
||||
"composer unit",
|
||||
"composer lint",
|
||||
"composer style",
|
||||
"composer require-check",
|
||||
"composer security-check",
|
||||
"composer unused-check",
|
||||
"composer normalize --dry-run"
|
||||
],
|
||||
"unit": "vendor/bin/phpunit --configuration phpunit.xml --colors=never",
|
||||
"unused-check": "vendor/bin/composer-unused"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* `skeleton` configuration
|
||||
*/
|
||||
return [
|
||||
|
||||
];
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "vite build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"laravel-vite-plugin": "^0.8.0",
|
||||
"sass": "^1.62",
|
||||
"vite": "^4.3"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ruleset name="CCS-P-1">
|
||||
<description>Crawl Coding Standard for Packages</description>
|
||||
|
||||
<rule ref="vendor/crawl/coding-standard/src/rulesets/phpcs.xml"/>
|
||||
|
||||
<rule ref="SlevomatCodingStandard.Files.TypeNameMatchesFileName">
|
||||
<properties>
|
||||
<property name="rootNamespaces" type="array">
|
||||
<element key="src" value="Vertumnus\Skeleton"/>
|
||||
<element key="tests" value="Vertumnus\Skeleton\Tests"/>
|
||||
</property>
|
||||
</properties>
|
||||
</rule>
|
||||
|
||||
<file>config</file>
|
||||
<file>database</file>
|
||||
<file>resources</file>
|
||||
<file>src</file>
|
||||
<file>tests</file>
|
||||
</ruleset>
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd" bootstrap="vendor/autoload.php" colors="true" cacheDirectory=".phpunit.cache">
|
||||
<coverage/>
|
||||
<testsuites>
|
||||
<testsuite name="Unit">
|
||||
<directory suffix="Test.php">./tests/</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
<php>
|
||||
|
||||
</php>
|
||||
<source>
|
||||
<include>
|
||||
<directory suffix=".php">./src</directory>
|
||||
</include>
|
||||
</source>
|
||||
</phpunit>
|
|
@ -0,0 +1 @@
|
|||
|
|
@ -0,0 +1 @@
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"resources/js/app.js": {
|
||||
"file": "app.js",
|
||||
"isEntry": true,
|
||||
"src": "resources/js/app.js"
|
||||
},
|
||||
"resources/sass/app.scss": {
|
||||
"file": "app.css",
|
||||
"isEntry": true,
|
||||
"src": "resources/sass/app.scss"
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
/** Package JS goes here */
|
|
@ -0,0 +1 @@
|
|||
/** Package CSS goes here */
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Vertumnus\Skeleton;
|
||||
|
||||
final class Skeleton
|
||||
{
|
||||
public const PACKAGE_VENDOR = 'vertumnus';
|
||||
public const PACKAGE_NAME = 'skeleton';
|
||||
|
||||
// Build your next great package.
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Vertumnus\Skeleton;
|
||||
|
||||
use Illuminate\Support\Facades\Facade;
|
||||
|
||||
/**
|
||||
* @see Skeleton
|
||||
*/
|
||||
final class SkeletonFacade extends Facade
|
||||
{
|
||||
/**
|
||||
* Get the registered name of the component.
|
||||
*/
|
||||
protected static function getFacadeAccessor(): string
|
||||
{
|
||||
return Skeleton::PACKAGE_NAME;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Vertumnus\Skeleton;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
final class SkeletonServiceProvider extends ServiceProvider
|
||||
{
|
||||
private const COMMANDS = [
|
||||
|
||||
];
|
||||
|
||||
/**
|
||||
* Bootstrap the application services.
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
// Optional methods to load package assets
|
||||
//$this->loadMigrationsFrom($this->packageRoot() . '/database/migrations');
|
||||
//$this->loadRoutesFrom($this->packageRoot() . '/routes.php');
|
||||
//$this->loadTranslationsFrom($this->packageRoot() . '/resources/lang', Skeleton::PACKAGE_NAME);
|
||||
//$this->loadViewsFrom($this->packageRoot() . '/resources/views', Skeleton::PACKAGE_NAME);
|
||||
|
||||
if ($this->app->runningInConsole()) {
|
||||
// Publish config
|
||||
$this->publishes([
|
||||
$this->packageRoot() . '/config/config.php' => config_path(Skeleton::PACKAGE_NAME . '.php'),
|
||||
], Skeleton::PACKAGE_NAME . '-config');
|
||||
|
||||
// Publish assets
|
||||
//$this->publishes([
|
||||
// $this->packageRoot() . '/public' => public_path('vendor/' . Skeleton::PACKAGE_NAME),
|
||||
//], Skeleton::PACKAGE_NAME . '-assets');
|
||||
|
||||
// Publish translation files
|
||||
//$this->publishes([
|
||||
// $this->packageRoot() . '/resources/lang' => resource_path('lang/vendor/' . Skeleton::PACKAGE_NAME),
|
||||
//], Skeleton::PACKAGE_NAME . '-lang');
|
||||
|
||||
// Publish views
|
||||
//$this->publishes([
|
||||
// $this->packageRoot() . '/resources/views' => resource_path('views/vendor/' . Skeleton::PACKAGE_NAME),
|
||||
//], Skeleton::PACKAGE_NAME . '-views');
|
||||
|
||||
// Registering package commands
|
||||
$this->commands(self::COMMANDS);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the application services.
|
||||
*/
|
||||
public function register(): void
|
||||
{
|
||||
// Automatically apply the package configuration
|
||||
$this->mergeConfigFrom($this->packageRoot() . '/config/config.php', Skeleton::PACKAGE_NAME);
|
||||
|
||||
// Register the main class to use with the facade
|
||||
$this->app->singleton(Skeleton::PACKAGE_NAME, static function () {
|
||||
return new Skeleton();
|
||||
});
|
||||
}
|
||||
|
||||
private function packageRoot(): string
|
||||
{
|
||||
return dirname(__DIR__ . DIRECTORY_SEPARATOR . '..') . DIRECTORY_SEPARATOR;
|
||||
}
|
||||
|
||||
private function resourcesPath(): string
|
||||
{
|
||||
return $this->packageRoot() . DIRECTORY_SEPARATOR . 'resources' . DIRECTORY_SEPARATOR;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
import {defineConfig} from 'vite';
|
||||
import laravel from 'laravel-vite-plugin';
|
||||
|
||||
export default defineConfig({
|
||||
build: {
|
||||
outDir: 'public',
|
||||
rollupOptions: {
|
||||
output: {
|
||||
entryFileNames: `[name].js`,
|
||||
assetFileNames: `[name].[ext]`
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
laravel({
|
||||
input: [
|
||||
'resources/sass/app.scss',
|
||||
'resources/js/app.js',
|
||||
],
|
||||
refresh: false,
|
||||
}),
|
||||
],
|
||||
});
|
Loading…
Reference in New Issue