Skip to content

Commit

Permalink
setup
Browse files Browse the repository at this point in the history
  • Loading branch information
veneliniliev committed Sep 25, 2019
1 parent 579386c commit 971cbde
Show file tree
Hide file tree
Showing 21 changed files with 561 additions and 113 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
composer.lock
vendor
node_modules
coverage
.idea
.idea
package-lock.json
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ composer require provision/administration

``` bash
composer test
composer phpmd
composer phpcs
```

### Changelog
Expand Down
12 changes: 12 additions & 0 deletions build/resources/css/app.css

Large diffs are not rendered by default.

127 changes: 127 additions & 0 deletions build/resources/js/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "/";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 0);
/******/ })
/************************************************************************/
/******/ ({

/***/ "./resources/js/app.js":
/*!*****************************!*\
!*** ./resources/js/app.js ***!
\*****************************/
/*! no static exports found */
/***/ (function(module, exports) {

/*
* Copyright (c) 2019. ProVision Media Group Ltd. <http://provision.bg>
* Venelin Iliev <http://veneliniliev.com>
*/

/***/ }),

/***/ "./resources/sass/app.scss":
/*!*********************************!*\
!*** ./resources/sass/app.scss ***!
\*********************************/
/*! no static exports found */
/***/ (function(module, exports) {

// removed by extract-text-webpack-plugin

/***/ }),

/***/ 0:
/*!*************************************************************!*\
!*** multi ./resources/js/app.js ./resources/sass/app.scss ***!
\*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(/*! F:\PhpstormProjects\laravel6\packages\provision\administration\resources\js\app.js */"./resources/js/app.js");
module.exports = __webpack_require__(/*! F:\PhpstormProjects\laravel6\packages\provision\administration\resources\sass\app.scss */"./resources/sass/app.scss");


/***/ })

/******/ });
110 changes: 59 additions & 51 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,54 +1,62 @@
{
"name": "provision/administration",
"description": "Laravel administration",
"keywords": [
"provision",
"administration"
],
"homepage": "https://github.com/provisionbg/administration",
"license": "MIT",
"type": "library",
"authors": [
{
"name": "Venelin Iliev",
"email": "[email protected]",
"role": "Developer"
}
],
"require": {
"php": "^7.2",
"laravel/framework": "^6.0.0"
},
"require-dev": {
"orchestra/testbench": "4.*",
"phpunit/phpunit": "^8.0"
},
"autoload": {
"psr-4": {
"ProVision\\Administration\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"ProVision\\Administration\\Tests\\": "tests"
}
},
"scripts": {
"test": "vendor/bin/phpunit",
"test-coverage": "vendor/bin/phpunit --coverage-html coverage"

},
"config": {
"sort-packages": true
},
"extra": {
"laravel": {
"providers": [
"ProVision\\Administration\\AdministrationServiceProvider"
],
"aliases": {
"Administration": "ProVision\\Administration\\AdministrationFacade"
}
}
"name": "provision/administration",
"description": "Laravel administration",
"keywords": [
"provision",
"administration"
],
"support": {
"issues": "https://github.com/ProVisionBG/administration/issues",
"source": "https://github.com/ProVisionBG/administration"
},
"homepage": "https://github.com/provisionbg/administration",
"license": "MIT",
"type": "library",
"authors": [
{
"name": "Venelin Iliev",
"email": "[email protected]"
}
],
"require": {
"php": "^7.2",
"laravel/framework": "^6.0.0",
"nwidart/laravel-modules": "^6.0.0"
},
"require-dev": {
"orchestra/testbench": "^4.0.0",
"phpmd/phpmd": "^2.7",
"phpunit/phpunit": "^8.0",
"squizlabs/php_codesniffer": "^3.4"
},
"autoload": {
"psr-4": {
"ProVision\\Administration\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"ProVision\\Administration\\Tests\\": "tests"
}
},
"scripts": {
"test": "vendor/bin/phpunit",
"test-coverage": "vendor/bin/phpunit --coverage-html coverage",
"phpmd": "vendor\\bin\\phpmd src/ text phpmd.xml",
"phpcs": "vendor\\bin\\phpcs"
},
"config": {
"sort-packages": true
},
"extra": {
"laravel": {
"providers": [
"ProVision\\Administration\\Providers\\AdministrationServiceProvider",
"ProVision\\Administration\\Providers\\AdministrationRouteServiceProvider"
],
"aliases": {
"Administration": "ProVision\\Administration\\AdministrationFacade"
}
}
}
}
5 changes: 5 additions & 0 deletions config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,9 @@

return [

/*
* Administration url prefix
*/
'url_prefix' => 'admin'

];
4 changes: 4 additions & 0 deletions mix-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"/build/resources/js/app.js": "/build/resources/js/app.js",
"/build/resources/css/app.css": "/build/resources/css/app.css"
}
23 changes: 23 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "npm run development -- --watch",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"devDependencies": {
"cross-env": "^5.1",
"laravel-mix": "^4.0.7",
"resolve-url-loader": "^2.3.1",
"sass": "^1.15.2",
"sass-loader": "^7.1.0",
"vue-template-compiler": "^2.6.10"
},
"dependencies": {
"admin-lte": "^2.4.18"
}
}
33 changes: 33 additions & 0 deletions phpcs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0"?>
<!--
~ Copyright (c) 2019. ProVision Media Group Ltd. <http://provision.bg>
~ Venelin Iliev <http://veneliniliev.com>
-->

<ruleset name="PSR2">
<description>The PSR2 coding standard.</description>
<arg value="s"/>
<rule ref="PSR2"/>
<file>src/</file>
<rule ref="Squiz.Commenting.FunctionComment">
<exclude name="Squiz.Commenting.FunctionComment.MissingParamComment"/>
<exclude name="Squiz.Commenting.FunctionComment.TypeHintMissing"/>
</rule>
<rule ref="Squiz.Commenting.FunctionCommentThrowTag">
<exclude name="Squiz.Commenting.FunctionComment.EmptyThrows"/>
</rule>
<rule ref="Squiz.Commenting.ClassComment">
<severity>0</severity>
</rule>
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="130"/>
</properties>
</rule>
<rule ref="Squiz.Commenting.VariableComment"/>
<exclude-pattern>vendor</exclude-pattern>
<exclude-pattern>resources</exclude-pattern>
<exclude-pattern>database/</exclude-pattern>
<exclude-pattern>storage/</exclude-pattern>
<exclude-pattern>node_modules/</exclude-pattern>
</ruleset>
55 changes: 55 additions & 0 deletions phpmd.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2019. ProVision Media Group Ltd. <https://provision.bg>
~ Venelin Iliev <https://veneliniliev.com>
-->

<ruleset name="Laravel and similar phpmd ruleset"
xmlns="http://pmd.sf.net/ruleset/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
<rule ref="rulesets/cleancode.xml">
<exclude name="StaticAccess"/>
</rule>
<rule ref="rulesets/codesize.xml/CyclomaticComplexity"/>
<rule ref="rulesets/codesize.xml/NPathComplexity"/>
<rule ref="rulesets/codesize.xml/ExcessiveMethodLength"/>
<rule ref="rulesets/codesize.xml/ExcessiveClassLength"/>
<rule ref="rulesets/codesize.xml/ExcessiveParameterList"/>
<rule ref="rulesets/codesize.xml/ExcessivePublicCount"/>
<rule ref="rulesets/codesize.xml/TooManyFields"/>
<rule ref="rulesets/codesize.xml/TooManyMethods">
<!--<properties>-->
<!--<property name="maxmethods" value="30"/>-->
<!--</properties>-->
</rule>
<rule ref="rulesets/codesize.xml/ExcessiveClassComplexity"/>
<rule ref="rulesets/controversial.xml"/>
<rule ref="rulesets/design.xml">
<exclude name="CouplingBetweenObjects"/>
<exclude name="NumberOfChildren"/>
</rule>
<rule ref="rulesets/design.xml/CouplingBetweenObjects">
<properties>
<property name="maximum" value="20"/>
</properties>
</rule>
<rule ref="rulesets/naming.xml">
<exclude name="ShortVariable"/>
</rule>
<rule ref="rulesets/naming.xml/ShortVariable"
since="0.2"
message="Avoid variables with short names like {0}. Configured minimum length is {1}."
class="PHPMD\Rule\Naming\ShortVariable"
externalInfoUrl="http://phpmd.org/rules/naming.html#shortvariable">
<priority>3</priority>
<properties>
<property name="minimum" description="Minimum length for a variable, property or parameter name" value="3"/>
<property name="exceptions" value="id,q,w,i,j,v,e,f,fp" />
</properties>
</rule>
<rule ref="rulesets/unusedcode.xml">
<exclude name="UnusedFormalParameter"></exclude>
</rule>
</ruleset>
5 changes: 5 additions & 0 deletions resources/js/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/*
* Copyright (c) 2019. ProVision Media Group Ltd. <http://provision.bg>
* Venelin Iliev <http://veneliniliev.com>
*/

Loading

0 comments on commit 971cbde

Please sign in to comment.