diff --git a/.babelrc b/.babelrc old mode 100755 new mode 100644 index 968e86e..d1d74b1 --- a/.babelrc +++ b/.babelrc @@ -1,12 +1,7 @@ { + "presets": ["@babel/preset-env"], "plugins": [ - "transform-class-properties", - "transform-object-rest-spread" - ], - "presets": [ - ["env", { - "modules": false - }], - "stage-0" + "@babel/plugin-proposal-class-properties", + "@babel/plugin-proposal-object-rest-spread" ] -} +} \ No newline at end of file diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..e1943a7 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,56 @@ +{ + "extends": "airbnb-base", + "parser": "@babel/eslint-parser", + "settings": { + "ecmascript": 7 + }, + "parserOptions": { + "ecmaVersion": 2018, + "ecmaFeatures": { + "modules": true, + "destructuring": true, + "classes": true, + "forOf": true, + "blockBindings": true, + "arrowFunctions": true + } + }, + "env": { + "browser": true + }, + "rules": { + "arrow-body-style": 0, + "prefer-arrow-callback": 0, + "arrow-parens": 0, + "no-param-reassign": 0, + "no-new": 0, + "consistent-return": 0, + "key-spacing": 0, + "no-multi-spaces": 0, + "no-underscore-dangle": 0, + "one-var": 0, + "global-require": 0, + "class-methods-use-this": 0, + "comma-dangle": ["error", { + "arrays": "always-multiline", + "objects": "always-multiline", + "imports": "always-multiline", + "exports": "always-multiline", + "functions": "never" + }], + "func-names": 0, + "function-paren-newline": 0, + "indent": 2, + "new-cap": 0, + "no-plusplus": 0, + "no-return-assign": 0, + "quote-props": 0, + "template-curly-spacing": 0, + "no-unused-expressions": 0, + "import/extensions": 0, + "import/no-extraneous-dependencies": 0, + "import/no-unresolved": 0, + "import/prefer-default-export": 0, + "linebreak-style": ["error", "windows"] + } +} \ No newline at end of file diff --git a/.eslintrc.yml b/.eslintrc.yml deleted file mode 100755 index 143c784..0000000 --- a/.eslintrc.yml +++ /dev/null @@ -1,66 +0,0 @@ ---- - extends: - airbnb-base - - parser: - babel-eslint - - settings: - ecmascript: 7 - - parserOptions: - ecmaFeatures: - modules: true - destructuring: true - experimentalObjectRestSpread: true - classes: true - forOf: true - blockBindings: true - arrowFunctions: true - - env: - browser: true - - rules: - # ------------- - # General Rules - # ------------- - - arrow-body-style: 0 - prefer-arrow-callback: 0 - arrow-parens: 0 - no-param-reassign: 0 - no-new: 0 - consistent-return: 0 - key-spacing: 0 - no-multi-spaces: 0 - no-underscore-dangle: 0 - one-var: 0 - global-require: 0 - class-methods-use-this: 0 - comma-dangle: ["error", { - "arrays": "always-multiline", - "objects": "always-multiline", - "imports": "always-multiline", - "exports": "always-multiline", - "functions": "never" - }] - func-names: 0 - function-paren-newline: 0 - indent: 2 - new-cap: 0 - no-plusplus: 0 - no-return-assign: 0 - quote-props: 0 - template-curly-spacing: 0 - no-unused-expressions: 0 - - - # ------------ - # Import Rules - # ------------ - - import/extensions: 0 - import/no-extraneous-dependencies: 0 - import/no-unresolved: 0 - import/prefer-default-export: 0 diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml new file mode 100644 index 0000000..909113c --- /dev/null +++ b/.github/workflows/merge.yml @@ -0,0 +1,35 @@ +name: Merge checks + +on: + pull_request: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [20.x] + + steps: + - uses: actions/checkout@v3 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + + - name: Build + run: | + npm install + npm run build + + - name: Get version + run: echo "::set-output name=version::v$(./ci/getVersion.sh)" + id: version + + - name: Verify version + run: | + ./ci/verifyVersion.sh ${{ steps.version.outputs.version }} \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..dc7c48e --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,50 @@ +name: NodeJS with Webpack + +on: + push: + branches: [ "master" ] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [20.x] + + steps: + - uses: actions/checkout@v3 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + + - name: Build + run: | + npm install + npm run release:minified + zip -r -j static_minified.zip dist/* + npm run release:unminified + zip -r -j static_unminified.zip dist/* + + - name: Get version + run: echo "::set-output name=version::v$(./ci/getVersion.sh)" + id: version + + - name: Verify version + run: | + ./ci/verifyVersion.sh ${{ steps.version.outputs.version }} + + # Verify changelog has entry with new version + - name: Release + uses: softprops/action-gh-release@v1 + with: + name: ${{ steps.version.outputs.version }} + tag_name: ${{ steps.version.outputs.version }} + files: | + static_minified.zip + static_unminified.zip + fail_on_unmatched_files: true + prerelease: false + draft: false \ No newline at end of file diff --git a/.gitignore b/.gitignore index 9848098..7d05325 100755 --- a/.gitignore +++ b/.gitignore @@ -23,10 +23,10 @@ logs npm-debug.log* node_modules yarn.lock -package-lock.json # ---------------------------- # Project Folders # ---------------------------- build/ +dist/ diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..209e3ef --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +20 diff --git a/.stylelintrc.json b/.stylelintrc.json new file mode 100644 index 0000000..ae49858 --- /dev/null +++ b/.stylelintrc.json @@ -0,0 +1,9 @@ +{ + "extends": "stylelint-config-standard", + "rules": { + "at-rule-no-unknown": null, + "at-rule-empty-line-before": null, + "selector-list-comma-newline-after": null, + "block-opening-brace-space-before": null + } +} \ No newline at end of file diff --git a/.stylelintrc.yml b/.stylelintrc.yml deleted file mode 100755 index 8d3f7e0..0000000 --- a/.stylelintrc.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- - extends: stylelint-config-standard - rules: - at-rule-no-unknown: null - at-rule-empty-line-before: null - selector-list-comma-newline-after: null - block-opening-brace-space-before: null diff --git a/CHANGELOG.md b/CHANGELOG.md index f443684..9228271 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ -### Changelog +# Changelog -#### 1.0.0 +## [2.1.0] +- Upgraded all dependencies +## [2.0.0] + +### Changed +- Upgrade to Bootstrap 5 + +## [1.1.0] + +### Changed +- Upgrade to webpack 5 + +## [1.0.0] + +### Added - Intial release diff --git a/README.md b/README.md index 9607a9a..86d2e76 100755 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# Adminator HTML5 Admin Template -**Adminator** is a responsive Bootstrap 4 Admin Template. It provides you with a collection of ready to use code snippets and utilities, custom pages, a collection of applications and some useful widgets. Preview of this awesome admin template available here: https://colorlib.com/polygon/adminator/index.html +# Adminator Bootstrap 5 Admin Template +**Adminator** is a responsive Bootstrap 5 Admin Template. It provides you with a collection of ready to use code snippets and utilities, custom pages, a collection of applications and some useful widgets. Preview of this awesome admin template available here: https://colorlib.com/polygon/adminator/index.html # Preview @@ -13,6 +13,7 @@ - [Getting Started](#getting-started) - [Prerequisites](#prerequisites) - [Installing & Local Development](#installing--local-development) +- [Adminator for other platforms and frameworks](#adminator-for-other-platforms-and-frameworks) - [Files/Folder Structure](#filesfolders-structure) - [Deployment](#deployment) - [Built With](#built-with) @@ -22,10 +23,10 @@ ## Getting Started -In order to run **Adminator** on your local machine all what you need to do is to have the prerequisites stated below installed on your machine and follow the installation steps down below. +In order to run **Adminator** on your local machine all what you need to do is to have the prerequisites stated below installed on your machine and follow the installation steps down below. Prebuilt static assets can be found under [releases](https://github.com/puikinsh/Adminator-admin-dashboard/releases). #### Prerequisites - - Node.js + - Node.js 14+ - Yarn or NPM - Git - libpng-dev *linux only* @@ -39,7 +40,8 @@ Start by typing the following commands in your terminal in order to get **Admina > npm install > npm run dev ``` - +## Adminator for other platforms and frameworks +* [Adminator right to left](https://github.com/mortezakarimi/Adminator-admin-dashboard-rtl) Adminator modified to work with right to left languages like Persian and Arabic ## Files/Folders Structure Here is a brief explanation of the template folder structure and some of its main files usage: diff --git a/browserslist b/browserslist index ba62021..44e9808 100755 --- a/browserslist +++ b/browserslist @@ -1 +1,11 @@ -Last 3 versions +# https://github.com/browserslist/browserslist#readme + +>= 0.5% +last 2 major versions +not dead +Chrome >= 60 +Firefox >= 60 +Firefox ESR +iOS >= 12 +Safari >= 12 +not Explorer <= 11 \ No newline at end of file diff --git a/ci/getVersion.sh b/ci/getVersion.sh new file mode 100755 index 0000000..efd8253 --- /dev/null +++ b/ci/getVersion.sh @@ -0,0 +1 @@ +echo $(sed 's/.*"version": "\(.*\)".*/\1/;t;d' ./package.json) \ No newline at end of file diff --git a/ci/verifyVersion.sh b/ci/verifyVersion.sh new file mode 100755 index 0000000..75ac0eb --- /dev/null +++ b/ci/verifyVersion.sh @@ -0,0 +1,9 @@ +VERSION=$1 +TAG_EXISTS=$(git ls-remote --tags origin $VERSION | wc -l) + +if [ $TAG_EXISTS -eq "1" ]; then + echo "The tag '$VERSION' already exists. Please update version in package.json."; + exit 1; +fi + +echo "The tag '$VERSION' does not exist - success."; \ No newline at end of file diff --git a/forms.php b/forms.php index c47ffdf..9d2b2a5 100644 --- a/forms.php +++ b/forms.php @@ -312,7 +312,7 @@