From a980449e2319dbb8d73dbea28d8f1b2c88377fee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Ru=C5=BEevi=C4=87?= Date: Wed, 15 May 2024 13:42:20 +0200 Subject: [PATCH] Feature/release (#18) * init * updating copy * updating min php --- .browserslistrc | 4 -- .eslintignore | 1 - .eslintrc | 3 -- .gitattributes | 6 --- .gitignore | 1 + .stylelintrc | 5 --- CHANGELOG.md | 37 ++++++++++------ LICENSE | 2 +- README.md | 63 +++++++++------------------ babel.config.js | 3 -- composer.json | 32 +++----------- eightshift-boilerplate-plugin.php | 43 +++++++++++++++++++ eightshift-boilerplate.php | 71 ------------------------------- package.json | 45 -------------------- phpcs.xml.dist | 29 ------------- postcss.config.js | 7 --- src/Activate.php | 32 -------------- src/Deactivate.php | 28 ------------ src/PluginFactory.php | 34 --------------- uninstall.php | 18 -------- webpack.config.js | 19 --------- 21 files changed, 96 insertions(+), 387 deletions(-) delete mode 100644 .browserslistrc delete mode 100644 .eslintignore delete mode 100644 .eslintrc delete mode 100644 .gitattributes delete mode 100644 .stylelintrc delete mode 100644 babel.config.js create mode 100644 eightshift-boilerplate-plugin.php delete mode 100644 eightshift-boilerplate.php delete mode 100644 package.json delete mode 100644 phpcs.xml.dist delete mode 100644 postcss.config.js delete mode 100644 src/Activate.php delete mode 100644 src/Deactivate.php delete mode 100644 src/PluginFactory.php delete mode 100644 uninstall.php delete mode 100644 webpack.config.js diff --git a/.browserslistrc b/.browserslistrc deleted file mode 100644 index e3480b7..0000000 --- a/.browserslistrc +++ /dev/null @@ -1,4 +0,0 @@ -defaults -not IE 11 -not op_mini all -not op_mob 64 diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 9f9b48d..0000000 --- a/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -public/**/*.js diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 9e928e3..0000000 --- a/.eslintrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "./node_modules/@eightshift/frontend-libs/linters/eslint.config.js" -} \ No newline at end of file diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 09c3d5e..0000000 --- a/.gitattributes +++ /dev/null @@ -1,6 +0,0 @@ -CHANGELOG.md -CODE_OF_CONDUCT.md -.github -README.md - -/package export-ignore diff --git a/.gitignore b/.gitignore index c5cdc38..9672b6b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # Project Specific /public /vendor +/vendor-prefixed /node_modules /storybook .DS_Store diff --git a/.stylelintrc b/.stylelintrc deleted file mode 100644 index 432197d..0000000 --- a/.stylelintrc +++ /dev/null @@ -1,5 +0,0 @@ - -{ - "extends": "./node_modules/@eightshift/frontend-libs/linters/stylelint.config.js", - "ignoreFiles": "public/**/*.css" -} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 650d462..415b1a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,46 +1,56 @@ -# Change Log for the Eightshift Boilerplate +# Change Log for the Eightshift Boilerplate Plugin All notable changes to this project will be documented in this file. This projects adheres to [Semantic Versioning](https://semver.org/) and [Keep a CHANGELOG](https://keepachangelog.com/). -## [4.0.0] - 2023-02-21 +## [5.0.0] + +### Update +- Boilerplate is clean and is using only temporary files used for the initial setup. After running the setup, the temporary files are removed and replaced with the actual files. +- Minimum PHP version is now 8.2+. + +## [4.0.0] + +### Update - Updating packages. - Full change log can be checked on Github [frontend-libs release](https://github.com/infinum/eightshift-frontend-libs/releases/tag/8.0.0) and [libs release](https://github.com/infinum/eightshift-libs/releases/tag/6.4.0). -## [3.0.0] - 2022-07-11 +## [3.0.0] -- Updating packages- +### Update +- Updating packages - Full change log can be checked on Github [frontend-libs release](https://github.com/infinum/eightshift-frontend-libs/releases/tag/7.0.0) and [libs release](https://github.com/infinum/eightshift-libs/releases/tag/6.0.0). -## [2.0.0] - 2021-08-16 +## [2.0.0] +### Update - Major braking changes do to updates on css variables, and helpers. -## [1.3.0] - 2020-05-25 +## [1.3.0] ### Changed - `Eightshift-frontend-libs` update. - `Eightshift-libs` update. - `composer.json` updated packages, fixing scripts names. -## [1.2.2] - 2020-05-15 +## [1.2.2] ### Changed - `Eightshift-frontend-libs` update. - `Eightshift-libs` update. -## [1.2.1] - 2020-05-13 +## [1.2.1] ### Changed - `Eightshift-frontend-libs` update. - `Eightshift-libs` update. * Modified const name in wp-config-project.php from ES_ENV to EB_ENV to be consistent with the rest of the project. -* Adde eslint rule to ignore external dependencies from @eightshift/frontend-libs. +* Added eslint rule to ignore external dependencies from @eightshift/frontend-libs. -## [1.2.0] - 2020-05-06 +## [1.2.0] ### Changed - `Eightshift-frontend-libs` update. @@ -56,19 +66,19 @@ This projects adheres to [Semantic Versioning](https://semver.org/) and [Keep a **BRAKING CHANGES:** - Please replace you old .babelrc file with the new one babel.config.js and convert it from .json to .js format. -## [1.1.0] - 2020-03-05 +## [1.1.0] ### Changed - Eightshift-frontend-libs update. - Eightshift-libs update. -## [1.0.2] - 2020-01-29 +## [1.0.2] ### Changed - Eightshift-frontend-libs update - Eightshift-libs update -## [1.0.1] - 2020-01-27 +## [1.0.1] ### Changed - Eightshift-frontend-libs update @@ -81,6 +91,7 @@ Initial tagged release. [Unreleased]: https://github.com/infinum/eightshift-boilerplate-plugin/compare/master...HEAD +[5.0.0]: https://github.com/infinum/eightshift-boilerplate-plugin/compare/4.0.0...5.0.0 [4.0.0]: https://github.com/infinum/eightshift-boilerplate-plugin/compare/3.0.0...4.0.0 [3.0.0]: https://github.com/infinum/eightshift-boilerplate-plugin/compare/2.0.0...3.0.0 [2.0.0]: https://github.com/infinum/eightshift-boilerplate-plugin/compare/v1.3.0...2.0.0 diff --git a/LICENSE b/LICENSE index e50408e..255fb93 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2022 Infinum +Copyright Infinum Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index f056b5e..db20ce3 100644 --- a/README.md +++ b/README.md @@ -4,58 +4,37 @@ [![GitHub stars](https://img.shields.io/github/stars/infinum/eightshift-boilerplate.svg?style=for-the-badge&label=Stars)](https://github.com/infinum/eightshift-boilerplate/) [![license](https://img.shields.io/github/license/infinum/eightshift-boilerplate.svg?style=for-the-badge)](https://github.com/infinum/eightshift-boilerplate) -# Eightshift WordPress Boilerplate Plugin +## About Eightshift Boilerplate Plugin -This repository contains all the tools you need to start building a modern WordPress plugin, using all the latest front end development tools. +Eightshift Boilerplate is a modern, Gutenberg-oriented, WordPress plugin boilerplate. It includes everything you need to start building a modern WordPress project, using state-of-the-art frontend development tools, and it's at the core of the Eightshift Development Kit. [Find out more in Eightshift Docs →](https://eightshift.com) -## :books: Table of contents -- [:mortar_board: Documentation](#documentation) -- [:tada: Awesome features](#awesome-features) -- [:school_satchel: Requirements](#requirements) -- [:rocket: Quick start](#quick-start) -- [:mailbox: Who do I talk to?](#who-do-i-talk-to) -- [:scroll: License](#license) +## ⚠️ Requirements +To get started, you'll need: -## Documentation -**For more documentation details follow [this link](https://eightshift.com).** +* [PHP 8.2+](https://www.php.net/) +* [Node LTS](https://nodejs.org/) +* [Composer](https://getcomposer.org/) +* [git](https://git-scm.com/) +* [WP-CLI](https://wp-cli.org/) -## Awesome features +## 🏁 Quick start -Here are some buzzwords why you should use Eightshift Boilerplate for your next project. For more documentation details follow [this link](https://eightshift.com). +If you'd like to get started ASAP, run `npx eightshift-create plugin` inside of `wp-content/plugins` to bootstrap your Eightshift Development Kit project. -- Custom Block Editor blocks -- OOP -- WP-CLI -- Webpack -- SASS -- Autoprefixer -- JS Compiler (Babel) -- Synchronised browser testing -- Minifying -- PHPCS -- Easy SASS media queries -- Cache busting -- Eightshift libs -- Eightshift Frontend Libs +[Documentation on getting started with Eightshift Boilerplate is available in Eightshift Docs →](https://eightshift.com/docs/theme/) -## Requirements +## 📚 Documentation -You can find all requirements on [this link](https://eightshift.com/docs/requirements). +Eightshift Development Kit comes with [comprehensive documentation](https://eightshift.com). -## Quick start +## 🛟 Getting help -You can find all steps necessary to start you project on [this link](https://eightshift.com/docs/plugin). +If you have any questions or problems, please [open an issue](https://github.com/infinum/eightshift-boilerplate-plugin/issues) on GitHub. -## Documentation -**For the full documentation please check this [link](https://eightshift.com).** +When submitting issues or otherwise participating in development, please follow our [code of conduct](https://github.com/infinum/eightshift-boilerplate-plugin/blob/develop/CODE_OF_CONDUCT.md), and fill out the issue template properly. We'll do our best to answer your issues as quickly as humanly possible: following these steps helps us out a lot in doing that. -## Who do I talk to? +## 👩‍💻 Maintainers 🧑‍💻 +Eightshift Boilerplate is maintained and sponsored by [Infinum](https://infinum.com). -If you have any questions or problems, please [open an issue](https://github.com/infinum/eightshift-boilerplate-plugin/issues) on github and we will do our best to give you a timely answer. - -## Maintainers -Eightshift Boilerplate is maintained and sponsored by -[Eightshift](https://eightshift.com) and [Infinum](https://infinum.com). - -## License -Eightshift Boilerplate ©2022 [Eightshift](https://eightshift.com) and [Infinum](https://infinum.com). It is free software, and may be redistributed under the terms specified in the LICENSE file. +## ⚖️ License +Eightshift Boilerplate Plugin [Infinum](https://infinum.com). It is free software, and may be redistributed under the terms specified in the LICENSE file. diff --git a/babel.config.js b/babel.config.js deleted file mode 100644 index 8d62641..0000000 --- a/babel.config.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - extends: './node_modules/@eightshift/frontend-libs/babel/babel.config.js', -}; \ No newline at end of file diff --git a/composer.json b/composer.json index 4aae7fb..2c588c9 100644 --- a/composer.json +++ b/composer.json @@ -1,11 +1,10 @@ { "name": "eightshift/eightshift-boilerplate-plugin", "description": "This repository contains all the tools you need to start building a modern WordPress project.", + "private": true, "keywords": [ - "composer", - "installer", "plugin", - "blocks", + "eightshift", "Gutenberg", "WordPress" ], @@ -24,19 +23,14 @@ "source": "https://github.com/infinum/eightshift-boilerplate-plugin" }, "require-dev": { - "infinum/eightshift-coding-standards": "^1.6", - "dealerdirect/phpcodesniffer-composer-installer": "^0.7", - "szepeviktor/phpstan-wordpress": "^1.1.7", - "php-stubs/wordpress-stubs": "^6.1.1" + "wp-cli/wp-cli": "^2.9" }, "require": { - "php": "^7.4 || <8.0", - "infinum/eightshift-libs": "^6.4.0", - "typisttech/imposter-plugin": "^0.6.2" + "php": ">=8.2" }, "autoload": { "psr-4": { - "EightshiftBoilerplate\\": "src/" + "EightshiftBoilerplatePlugin\\": "src/" } }, "minimum-stability": "dev", @@ -44,20 +38,6 @@ "config": { "sort-packages": true, "optimize-autoloader": true, - "process-timeout": 2000, - "allow-plugins": { - "dealerdirect/phpcodesniffer-composer-installer": true, - "typisttech/imposter-plugin": true - } - }, - "scripts": { - "analyze": "@php ./vendor/bin/phpstan analyze", - "standards:check": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs", - "standards:fix": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcbf" - }, - "extra": { - "imposter": { - "namespace": "EightshiftBoilerplatePluginVendor" - } + "process-timeout": 2000 } } diff --git a/eightshift-boilerplate-plugin.php b/eightshift-boilerplate-plugin.php new file mode 100644 index 0000000..73c96b7 --- /dev/null +++ b/eightshift-boilerplate-plugin.php @@ -0,0 +1,43 @@ +load('boilerplate'); +} diff --git a/eightshift-boilerplate.php b/eightshift-boilerplate.php deleted file mode 100644 index 349d1b0..0000000 --- a/eightshift-boilerplate.php +++ /dev/null @@ -1,71 +0,0 @@ -getPrefixesPsr4(), __NAMESPACE__))->register(); -} - -/** - * Run all WPCLI commands. - */ -if (class_exists(Cli::class)) { - (new Cli())->load('boilerplate'); -} diff --git a/package.json b/package.json deleted file mode 100644 index 1b028e5..0000000 --- a/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "@eightshift/eightshift-boilerplate-plugin", - "version": "4.0.0", - "description": "This repository contains all the tools you need to start building a modern WordPress project.", - "authors": [ - { - "name": "Eightshift team", - "email": "team@eightshift.com", - "homepage": "https://eightshift.com/", - "role": "Developer / IT Manager" - } - ], - "license": "MIT", - "repository": { - "type": "git", - "url": "git+https://github.com/infinum/eightshift-boilerplate-plugin.git" - }, - "bugs": { - "url": "https://github.com/infinum/eightshift-boilerplate-plugin/issues" - }, - "homepage": "https://github.com/infinum/eightshift-boilerplate-plugin#readme", - "scripts": { - "lintStyle": "stylelint **/*.scss", - "lintJs": "eslint src/ assets/", - "lint": "npm run lintJs && npm run lintStyle && composer standards:check -- --filter=gitstaged", - "start": "webpack --progress --watch --mode development", - "build": "webpack --progress --mode production", - "test": "wp boilerplate", - "storybookBuild": "build-storybook -s public -o storybook", - "storybook": "start-storybook -s public" - }, - "devDependencies": { - "husky": "^8.0.3", - "webpack": "^5.75.0", - "webpack-cli": "^5.0.1" - }, - "dependencies": { - "@eightshift/frontend-libs": "^8.0.0" - }, - "husky": { - "hooks": { - "pre-commit": "npm run lint" - } - } -} diff --git a/phpcs.xml.dist b/phpcs.xml.dist deleted file mode 100644 index 2cb51e2..0000000 --- a/phpcs.xml.dist +++ /dev/null @@ -1,29 +0,0 @@ - - - Ruleset for the Eightshift Boilerplate Plugin. - - - - */tests/* - */vendor/* - */public/* - */node_modules/* - */storybook/* - - - - - - - - . - - - - - - - - /src/CompiledContainer\.php - - diff --git a/postcss.config.js b/postcss.config.js deleted file mode 100644 index ef176f5..0000000 --- a/postcss.config.js +++ /dev/null @@ -1,7 +0,0 @@ -const autoprefixer = require('autoprefixer'); - -module.exports = { - plugins: [ - autoprefixer, - ], -}; \ No newline at end of file diff --git a/src/Activate.php b/src/Activate.php deleted file mode 100644 index e21c2d2..0000000 --- a/src/Activate.php +++ /dev/null @@ -1,32 +0,0 @@ -activate(); - } - - /** - * Deactivate the plugin. - */ - public static function deactivate(): void - { - (new Deactivate())->deactivate(); - } -} diff --git a/uninstall.php b/uninstall.php deleted file mode 100644 index 0829e2b..0000000 --- a/uninstall.php +++ /dev/null @@ -1,18 +0,0 @@ - { - - const projectConfig = { - config: { - projectDir: __dirname, // Current project directory absolute path. - projectUrl: 'dev.boilerplate.com', // Used for providing browsersync functionality. - projectPath: 'wp-content/plugins/eightshift-boilerplate', // Project path relative to project root. - }, - }; - - // Generate webpack config for this project using options object. - return require('./node_modules/@eightshift/frontend-libs/webpack')(argv.mode, projectConfig); -};