Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
lee-to committed Apr 9, 2023
0 parents commit 4cd6ac3
Show file tree
Hide file tree
Showing 32 changed files with 319 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.idea
vendor
composer.lock
node_modules
.phpunit.result.cache
.php-cs-fixer.cache
app
reports
35 changes: 35 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

$finder = Symfony\Component\Finder\Finder::create()
->in([
__DIR__ . '/src',
__DIR__ . '/tests',
])
->name('*.php')
->notName('*.blade.php')
->ignoreDotFiles(true)
->ignoreVCS(true);

return (new PhpCsFixer\Config())
->setRules([
'@PSR12' => true,
'array_syntax' => ['syntax' => 'short'],
'ordered_imports' => ['sort_algorithm' => 'alpha'],
'no_unused_imports' => true,
'not_operator_with_successor_space' => true,
'trailing_comma_in_multiline' => true,
'phpdoc_scalar' => true,
'unary_operator_spaces' => true,
'binary_operator_spaces' => true,
'blank_line_before_statement' => [
'statements' => ['break', 'continue', 'declare', 'return', 'throw', 'try'],
],
'phpdoc_single_line_var_spacing' => true,
'phpdoc_var_without_name' => true,
'method_argument_space' => [
'on_multiline' => 'ensure_fully_multiline',
'keep_multiple_spaces_after_comma' => true,
],
'single_trait_insert_per_statement' => true,
])
->setFinder($finder);
9 changes: 9 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
MIT License

Copyright (c) :author

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.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Remove excess
- Delete gitignore in directories
56 changes: 56 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"name": ":vendor_name/:package_name",
"description": "Description",
"keywords": ["keyword"],
"type": "library",
"homepage": "https://moonshine.cutcode.dev",
"license": "MIT",
"support": {
"issues": "https://github.com/:vendor_name/:package_name/issues",
"source": "https://github.com/:vendor_name/:package_name"
},
"authors": [
{
"name": "Author name",
"email": "[email protected]",
"homepage": "https://example.com"
}
],
"require": {
"php": "^8.0|^8.1|^8.2",
"ext-curl": "*",
"ext-json": "*"
},
"require-dev": {
"phpunit/phpunit": "^9.5.8",
"mockery/mockery": "^1.4.4",
"phpstan/phpstan": "^1.4.7",
"orchestra/testbench": "^4.0|^5.0|^6.0|^7.0|^8.0",
"brianium/paratest": "^6.8"
},
"autoload": {
"psr-4": {
"VendorName\\PackageName\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"VendorName\\PackageName\\Tests\\": "tests/",
"VendorName\\PackageName\\Database\\Factories\\": "database/factories/"
}
},
"conflict": {
"moonshine/moonshine": "<1.52"
},
"scripts": {
"test": "vendor/bin/phpunit",
"format": "vendor/bin/php-cs-fixer fix --allow-risky=yes"
},
"extra": {
"laravel": {
"providers": [
"VendorName\\PackageName\\Providers\\PackageNameServiceProvider"
]
}
}
}
5 changes: 5 additions & 0 deletions config/package_name.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

return [

];
2 changes: 2 additions & 0 deletions database/factories/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
2 changes: 2 additions & 0 deletions database/migrations/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
2 changes: 2 additions & 0 deletions lang/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
26 changes: 26 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"private": true,
"scripts": {
"dev": "vite",
"build": "vite build"
},
"devDependencies": {
"alpinejs": "^3.12.0",
"axios": "^1.3.4",
"lodash": "^4.17.21",
"vite": "^4.1.4"
},
"dependencies": {
"@alpinejs/persist": "^3.12.0",
"@tailwindcss/aspect-ratio": "^0.4.2",
"@tailwindcss/forms": "^0.5.3",
"@tailwindcss/typography": "^0.5.9",
"autoprefixer": "^10.4.14",
"postcss": "^8.4.21",
"postcss-import": "^15.1.0",
"postcss-nested": "^6.0.0",
"prettier": "^2.8.4",
"prettier-plugin-tailwindcss": "^0.2.4",
"tailwindcss": "^3.2.7"
}
}
37 changes: 37 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
beStrictAboutTestsThatDoNotTestAnything="false"
colors="true"
convertDeprecationsToExceptions="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnError="false"
stopOnFailure="false"
verbose="true"
>
<testsuites>
<testsuite name="Suite">
<directory suffix="Test.php">./tests</directory>
</testsuite>
</testsuites>
<php>
<env name="APP_KEY" value="AckfSECXIvnK5r28GVIWUAxmbBSjTsmF"/>

<ini name="date.timezone" value="UTC" />
<ini name="intl.default_locale" value="C.UTF-8" />
<ini name="memory_limit" value="2048M" />
<env name="DB_CONNECTION" value="testing" />
<!--
<env name="REDIS_HOST" value="127.0.0.1" />
<env name="REDIS_PORT" value="6379" />
-->
</php>
<coverage>
<include>
<directory suffix=".php">src</directory>
</include>
</coverage>
</phpunit>
8 changes: 8 additions & 0 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
plugins: {
'postcss-import': {},
'tailwindcss/nesting': {},
'tailwindcss': {},
'autoprefixer': {},
}
}
2 changes: 2 additions & 0 deletions public/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
2 changes: 2 additions & 0 deletions resources/views/fields/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
3 changes: 3 additions & 0 deletions routes/package_name.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php

use Illuminate\Support\Facades\Route;
2 changes: 2 additions & 0 deletions src/Actions/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
2 changes: 2 additions & 0 deletions src/Commands/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
2 changes: 2 additions & 0 deletions src/Dashboard/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
2 changes: 2 additions & 0 deletions src/Decorations/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
2 changes: 2 additions & 0 deletions src/Fields/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
2 changes: 2 additions & 0 deletions src/Filters/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
2 changes: 2 additions & 0 deletions src/FormComponents/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
2 changes: 2 additions & 0 deletions src/Http/Controllers/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
2 changes: 2 additions & 0 deletions src/InputExtensions/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
2 changes: 2 additions & 0 deletions src/Metrics/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
2 changes: 2 additions & 0 deletions src/Models/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
42 changes: 42 additions & 0 deletions src/Providers/PackageNameServiceProvider.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php

declare(strict_types=1);

namespace VendorName\PackageName\Providers;

use Illuminate\Support\ServiceProvider;

final class PackageNameServiceProvider extends ServiceProvider
{
public function register(): void
{
//
}

public function boot(): void
{
$this->loadMigrationsFrom(__DIR__ . '/../../database/migrations');
$this->loadTranslationsFrom(__DIR__ . '/../../lang', 'package_name');
$this->loadViewsFrom(__DIR__ . '/../../resources/views', 'package_name');
$this->loadRoutesFrom(__DIR__ . '/../../routes');

$this->publishes([
__DIR__ . '/../../config/package_name.php' => config_path('package_name.php'),
]);

$this->mergeConfigFrom(
__DIR__ . '/../../config/package_name.php',
'package_name'
);

$this->publishes([
__DIR__ . '/../../public' => public_path('vendor/package_name'),
], ['package_name-assets', 'laravel-assets']);

$this->publishes([
__DIR__ . '/../../lang' => $this->app->langPath('vendor/package_name'),
]);

$this->commands([]);
}
}
2 changes: 2 additions & 0 deletions src/Resources/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
17 changes: 17 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const plugin = require('tailwindcss/plugin');

module.exports = {
content: [
'./resources/views/**/*.blade.php',
],
darkMode: 'class',
theme: {},
variants: {
extend: {},
},
plugins: [
require('@tailwindcss/forms'),
require('@tailwindcss/typography'),
require('@tailwindcss/aspect-ratio')
],
}
2 changes: 2 additions & 0 deletions tests/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
26 changes: 26 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import {defineConfig} from 'vite';
export default defineConfig({
build: {
emptyOutDir: false,
manifest: true,
rollupOptions: {
input: ['resources/js/app.js'],
output: {
entryFileNames: `js/package.js`,
assetFileNames: file => {
let ext = file.name.split('.').pop()
if (ext === 'css') {
return 'css/package.css'
}

if (ext === 'woff2') {
return 'fonts/[name].[ext]'
}

return 'assets/[name].[ext]'
}
}
},
outDir: 'public',
},
});

0 comments on commit 4cd6ac3

Please sign in to comment.