From 4cd6ac322bde9e5864f0caede0e6ecc86750d5d0 Mon Sep 17 00:00:00 2001 From: LT Date: Mon, 10 Apr 2023 00:39:16 +0300 Subject: [PATCH] init --- .editorconfig | 9 ++++ .gitignore | 8 +++ .php-cs-fixer.dist.php | 35 ++++++++++++ LICENSE.md | 9 ++++ README.md | 2 + composer.json | 56 ++++++++++++++++++++ config/package_name.php | 5 ++ database/factories/.gitignore | 2 + database/migrations/.gitignore | 2 + lang/.gitignore | 2 + package.json | 26 +++++++++ phpunit.xml.dist | 37 +++++++++++++ postcss.config.js | 8 +++ public/.gitignore | 2 + resources/views/fields/.gitignore | 2 + routes/package_name.php | 3 ++ src/Actions/.gitignore | 2 + src/Commands/.gitignore | 2 + src/Dashboard/.gitignore | 2 + src/Decorations/.gitignore | 2 + src/Fields/.gitignore | 2 + src/Filters/.gitignore | 2 + src/FormComponents/.gitignore | 2 + src/Http/Controllers/.gitignore | 2 + src/InputExtensions/.gitignore | 2 + src/Metrics/.gitignore | 2 + src/Models/.gitignore | 2 + src/Providers/PackageNameServiceProvider.php | 42 +++++++++++++++ src/Resources/.gitignore | 2 + tailwind.config.js | 17 ++++++ tests/.gitignore | 2 + vite.config.js | 26 +++++++++ 32 files changed, 319 insertions(+) create mode 100644 .editorconfig create mode 100644 .gitignore create mode 100644 .php-cs-fixer.dist.php create mode 100644 LICENSE.md create mode 100644 README.md create mode 100644 composer.json create mode 100644 config/package_name.php create mode 100644 database/factories/.gitignore create mode 100644 database/migrations/.gitignore create mode 100644 lang/.gitignore create mode 100644 package.json create mode 100644 phpunit.xml.dist create mode 100644 postcss.config.js create mode 100644 public/.gitignore create mode 100644 resources/views/fields/.gitignore create mode 100644 routes/package_name.php create mode 100644 src/Actions/.gitignore create mode 100644 src/Commands/.gitignore create mode 100644 src/Dashboard/.gitignore create mode 100644 src/Decorations/.gitignore create mode 100644 src/Fields/.gitignore create mode 100644 src/Filters/.gitignore create mode 100644 src/FormComponents/.gitignore create mode 100644 src/Http/Controllers/.gitignore create mode 100644 src/InputExtensions/.gitignore create mode 100644 src/Metrics/.gitignore create mode 100644 src/Models/.gitignore create mode 100644 src/Providers/PackageNameServiceProvider.php create mode 100644 src/Resources/.gitignore create mode 100644 tailwind.config.js create mode 100644 tests/.gitignore create mode 100644 vite.config.js diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..fcdf61e --- /dev/null +++ b/.editorconfig @@ -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 \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cb96071 --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +.idea +vendor +composer.lock +node_modules +.phpunit.result.cache +.php-cs-fixer.cache +app +reports diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php new file mode 100644 index 0000000..ea229df --- /dev/null +++ b/.php-cs-fixer.dist.php @@ -0,0 +1,35 @@ +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); diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..489e850 --- /dev/null +++ b/LICENSE.md @@ -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. diff --git a/README.md b/README.md new file mode 100644 index 0000000..67cee60 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +- Remove excess +- Delete gitignore in directories diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..ae21f7e --- /dev/null +++ b/composer.json @@ -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": "author@example.com", + "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" + ] + } + } +} diff --git a/config/package_name.php b/config/package_name.php new file mode 100644 index 0000000..ca5d8ed --- /dev/null +++ b/config/package_name.php @@ -0,0 +1,5 @@ + + + + + ./tests + + + + + + + + + + + + + + src + + + diff --git a/postcss.config.js b/postcss.config.js new file mode 100644 index 0000000..c21ea62 --- /dev/null +++ b/postcss.config.js @@ -0,0 +1,8 @@ +module.exports = { + plugins: { + 'postcss-import': {}, + 'tailwindcss/nesting': {}, + 'tailwindcss': {}, + 'autoprefixer': {}, + } +} diff --git a/public/.gitignore b/public/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/public/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/resources/views/fields/.gitignore b/resources/views/fields/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/resources/views/fields/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/routes/package_name.php b/routes/package_name.php new file mode 100644 index 0000000..7c4d255 --- /dev/null +++ b/routes/package_name.php @@ -0,0 +1,3 @@ +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([]); + } +} diff --git a/src/Resources/.gitignore b/src/Resources/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/src/Resources/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/tailwind.config.js b/tailwind.config.js new file mode 100644 index 0000000..5196264 --- /dev/null +++ b/tailwind.config.js @@ -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') + ], +} diff --git a/tests/.gitignore b/tests/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/tests/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/vite.config.js b/vite.config.js new file mode 100644 index 0000000..34db86d --- /dev/null +++ b/vite.config.js @@ -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', + }, +});