Skip to content

Commit

Permalink
Update Readme and Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
lichtmetzger committed Feb 28, 2024
1 parent 6605586 commit 118050e
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 28 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
/node_modules/
/assets/css/
.idea
*.zip
44 changes: 36 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,46 @@
plugin_name = mega-forms-local-captcha

help:
@echo "Usage make <upload-to-dev|download-from-dev|pot>"

download-from-dev:
rsync -avz --exclude .git -e ssh [email protected]:dev/public/wp-content/plugins/mega-forms-local-captcha/ ./
rsync \
-avz \
--exclude .git \
-e ssh [email protected]:dev/public/wp-content/plugins/$(plugin_name)/ ./

upload-to-dev:
rsync -avz --delete --delete-excluded --exclude .git --exclude .vscode --exclude='/node_modules/*' -e ssh ./ [email protected]:dev/public/wp-content/plugins/mega-forms-local-captcha/

upload-to-gomi:
rsync -avz --delete --delete-excluded --exclude .git --exclude .vscode --exclude='/node_modules/*' -e ssh ./ [email protected]:dev/public/wp-content/plugins/mega-forms-local-captcha/

rsync \
-avz \
--delete \
--delete-excluded \
--exclude .git \
--exclude .github \
--exclude .idea \
--exclude='/node_modules/*' \
--exclude='*.zip' \
-e ssh ./ [email protected]:dev/public/wp-content/plugins/$(plugin_name)/

pot:
./vendor/bin/wp i18n make-pot --domain=mega-forms-local-captcha . languages/mega-forms-local-captcha.pot
./vendor/bin/wp i18n make-pot \
--domain=$(plugin_name) . languages/$(plugin_name).pot

release:
zip -r9 mega-forms-local-captcha.zip . -x *.git* node_modules/\* *.vscode* scss/\* package*.json composer.* Makefile Readme.md .nvmrc .npmrc phpcs.xml
rm -f $(plugin_name).zip; \
zip \
-r9 $(plugin_name).zip . \
-x \
*.git* \
node_modules/\* \
scss/\* \
package*.json \
composer.* \
Makefile \
Readme.md \
.idea/\* \
.nvmrc \
.editorconfig \
eslint.config.js \
.stylelintrc.* \
phpcs.xml \
.pre-commit-config.yaml
24 changes: 4 additions & 20 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,13 @@ https://getcomposer.org/download/
Then initialize it in the project folder:

```
composer install --no-dev
composer dump-autoload -o --no-dev
```

(Omit the --no-dev parameter if you want to use wpcs.)

This project is based on Node version 18.16.0. **If you use a different version and commit a reformatted package.json, you will be punished.**

Install it with nvm:

```
sudo apt install curl gnupg2 -y
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
source ~/.bashrc
nvm install 18.16.0
nvm use
composer install
composer dump-autoload
```

Then, use the npm package manager to install the project-specific (dev-)dependencies (wp-scripts, sass, stylelint-config).
This project is based on the Node version specified in the .nvmrc file. **If you use a different version and commit a reformatted package.json, you will be punished.**

```
npm i
```
Look up Node Version Manager (nvm) to see how to use it.

## Translations

Expand Down

0 comments on commit 118050e

Please sign in to comment.