Skip to content

Commit

Permalink
Merge pull request #28 from Make-Lemonade/wp-scripts
Browse files Browse the repository at this point in the history
Refactoring WordPress Plugin
  • Loading branch information
mauryaratan authored Nov 22, 2023
2 parents 353f72b + 9ffe925 commit b571124
Show file tree
Hide file tree
Showing 18 changed files with 8,277 additions and 6,870 deletions.
2 changes: 2 additions & 0 deletions .distignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@
/bundled
/node_modules

*.zip

.distignore
.gitignore
17 changes: 14 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,30 @@ module.exports = {
es6: true,
node: true
},
settings: {
"react": {
"version": "detect"
}
},
parser: "@babel/eslint-parser",
extends: ["eslint:recommended", "prettier", "plugin:react/recommended"],
globals: {
Atomics: "readonly",
SharedArrayBuffer: "readonly",
wp: "readonly"
wp: "readonly",
Lemonsqueezy: "readonly"
},
parser: "babel-eslint",

parserOptions: {
ecmaFeatures: {
jsx: true
},
ecmaVersion: 2018,
sourceType: "module"
requireConfigFile: false,
sourceType: "module",
babelOptions: {
"presets": ["@babel/preset-react"]
},
},
plugins: ["react"],
rules: {
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/node_modules
/bundled
/dist
/build
/vendor/
.DS_STORE
.wp-env.json
*.zip
21 changes: 0 additions & 21 deletions gulpfile.js

This file was deleted.

2 changes: 1 addition & 1 deletion lemonsqueezy.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Plugin Name: Lemon Squeezy
* Plugin URI: https://www.lemonsqueezy.com
* Description: Sell digital products the easy-peasy way directly from WordPress.
* Version: 1.2.2
* Version: 1.3.0
* Requires at least: 5.3
* Requires PHP: 7.0
* Author: Lemon Squeezy
Expand Down
124 changes: 42 additions & 82 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,84 +1,44 @@
{
"name": "lemonsqueezy",
"private": true,
"scripts": {
"checkFormat": "prettier --check \"./src/**/*.{js,json,css,scss}\"",
"format": "prettier --write \"./src/**/*.{js,json,css,scss}\"",
"lint": "eslint src",
"start": "webpack --mode=development --watch",
"build": "npm run lint && webpack --mode=production && gulp bundle",
"wp-env": "wp-env"
},
"repository": {
"type": "git",
"url": "https://github.com/Make-Lemonade/lemonsqueezy-wp.git"
},
"lint-staged": {
"linters": {
"src/**/*.js": "eslint",
"**/*.{js,json,css,scss}": [
"prettier --write",
"git add"
]
}
},
"author": "lemonsqueezy",
"license": "GPL-2.0+",
"bugs": {
"url": "https://github.com/Make-Lemonade/lemonsqueezy-wp/issues"
},
"homepage": "https://github.com/Make-Lemonade/lemonsqueezy-wp#readme",
"dependencies": {
"@wordpress/blob": "^2.13.0",
"@wordpress/block-editor": "^3.9.1",
"@wordpress/blocks": "^6.14.1",
"@wordpress/compose": "^3.25.0",
"@wordpress/data": "^4.27.0",
"@wordpress/edit-post": "^3.15.1",
"@wordpress/html-entities": "^2.11.0",
"@wordpress/i18n": "^3.19.0",
"@wordpress/plugins": "^2.25.0",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-sortable-hoc": "^1.11.0"
},
"devDependencies": {
"@babel/core": "^7.13.10",
"@babel/plugin-proposal-class-properties": "^7.13.0",
"@babel/preset-env": "^7.13.10",
"@babel/preset-react": "^7.12.13",
"@wordpress/browserslist-config": "^3.0.1",
"@wordpress/components": "^13.0.0",
"@wordpress/editor": "^9.14.1",
"@wordpress/element": "^2.20.0",
"@wordpress/env": "^4.1.2",
"autoprefixer": "^10.2.5",
"babel-eslint": "^10.0.1",
"babel-loader": "^8.2.2",
"browserslist": "^4.16.8",
"classnames": "^2.2.6",
"clean-webpack-plugin": "^3.0.0",
"css-loader": "^5.1.3",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.1.0",
"eslint-loader": "^2.1.2",
"eslint-plugin-react": "^7.22.0",
"file-loader": "^6.2.0",
"gulp": "^4.0.2",
"gulp-zip": "^4.2.0",
"lint-staged": "^10.5.4",
"loadash": "^1.0.0",
"mini-css-extract-plugin": "^1.3.9",
"node-sass": "^7.0.1",
"optimize-css-assets-webpack-plugin": "^6.0.1",
"postcss-loader": "^3.0.0",
"prettier": "^2.2.1",
"sass-loader": "^11.0.1",
"style-loader": "^2.0.0",
"webpack": "^5.26.3",
"webpack-cli": "^4.5.0"
},
"browserslist": [
"extends @wordpress/browserslist-config"
]
"name": "lemonsqueezy",
"files": [
"src",
"build",
"images",
"languages",
"lemonsqueezy.php",
"uninstall.php",
"readme.txt",
"changelog.*",
"license.*"
],
"private": true,
"scripts": {
"build": "wp-scripts lint-js && wp-scripts build src/script.js src/editor.js src/admin/admin.js && yarn plugin-zip",
"check-engines": "wp-scripts check-engines",
"check-licenses": "wp-scripts check-licenses",
"format": "wp-scripts format",
"lint:js": "wp-scripts lint-js",
"lint:pkg-json": "wp-scripts lint-pkg-json",
"packages-update": "wp-scripts packages-update",
"plugin-zip": "wp-scripts plugin-zip && move-file lemonsqueezy.zip bundled/lemonsqueezy.zip",
"start": "wp-scripts start src/script.js src/editor.js src/admin/admin.js"
},
"author": "lemonsqueezy",
"license": "GPL-2.0+",
"bugs": {
"url": "https://github.com/Make-Lemonade/lemonsqueezy-wp/issues"
},
"homepage": "https://github.com/Make-Lemonade/lemonsqueezy-wp#readme",
"repository": {
"type": "git",
"url": "https://github.com/Make-Lemonade/lemonsqueezy-wp.git"
},
"devDependencies": {
"@babel/eslint-parser": "^7.5.4",
"@wordpress/scripts": "^26.16.0",
"move-file-cli": "^3.0.0"
},
"dependencies": {
"standard": "^17.1.0"
}
}
13 changes: 11 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Contributors: lemonsqueezy, gilbitron, jamesckemp, patrickposner
Donate link: [https://lemonsqueezy.com](https://lemonsqueezy.com/)
Tags: lemon squeezy, ecommerce, digital products, checkout, payments, subscriptions, memberships, licenses
Requires at least: 5.3
Tested up to: 6.0.2
Stable tag: 1.2.2
Tested up to: 6.4.1
Stable tag: 1.3.0
Requires PHP: 7.0
License: GPLv2 or later
License URI: [https://www.gnu.org/licenses/gpl-2.0.html](https://www.gnu.org/licenses/gpl-2.0.html)
Expand Down Expand Up @@ -130,6 +130,15 @@ Any digital product you can dream of. Digital downloads, licensed software, eboo

== Changelog ==

= 1.3.0 =

- Improved performance of Lemon Squeezy in Block Editor on core Buttons
- Added option to pre-fill logged-in user's data on Checkout
- Added option to pre-fill data from URL query string following the same checkout pre-fill pattern
- Added option to define Custom Data when using LS button block
- Added option to define text and background colors for LS button block
- Added option to enter Test API key and with that enable Test Mode

= 1.2.2 =

- Minor bug fix
Expand Down
Loading

0 comments on commit b571124

Please sign in to comment.