Skip to content

Commit 1641bd2

Browse files
author
Rafael Grigorian
committed
Fixed the following issues:
- Fixed #65 - Fixed #66 - Fixed #67 - Fixed #68
1 parent cc3e677 commit 1641bd2

File tree

427 files changed

+4918
-21133
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

427 files changed

+4918
-21133
lines changed

.gitignore

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# Files
22
.DS_Store
3-
yarn-error.log
43
*.tar.gz
4+
*.zip
5+
yarn-error.log
56

67
# Directories
8+
.cache
9+
.parcel-cache
710
.docker-sync
8-
node_modules
9-
build
1011
dist
11-
public_html
12+
node_modules
1213
private
14+
public_html

.magento.docker.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: magento-development
2+
services:
3+
php:
4+
version: "7.4"
5+
mysql:
6+
version: "10.4"
7+
elasticsearch:
8+
version: "7.6"
9+
hooks:
10+
build: ""
11+
deploy: ""
12+
post_deploy: ""

.magento.setup.params

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
--base-url=https://howtospeedupmagento.com
2+
--base-url-secure=https://howtospeedupmagento.com
3+
--db-host=db.magento2.docker
4+
--db-name=magento2
5+
--db-user=magento2
6+
--db-password=magento2
7+
--backend-frontname=admin
8+
--admin-firstname=magento2
9+
--admin-lastname=magento2
10+
--admin-email=admin@example.com
11+
--admin-user=admin
12+
--admin-password=magento2
13+
--language=en_US
14+
--currency=USD
15+
--timezone=America/Chicago
16+
--use-rewrites=1
17+
--search-engine=elasticsearch7
18+
--elasticsearch-host=elasticsearch.magento2.docker
19+
--elasticsearch-port=9200
20+
--elasticsearch-username=elastic
21+
--elasticsearch-password=changeme

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8.16.1
1+
v12.22.1

Makefile

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
VENDOR=JetRails
2+
MODULE=Cloudflare
3+
NAMESPACE=$(VENDOR)"_"$(MODULE)
4+
NAMESPACE_PATH=$(VENDOR)"/"$(MODULE)
5+
VERSION=$(shell git describe --tags `git rev-list --tags --max-count=1`)
6+
MODULE_FILES=Block Console Controller Helper Model etc view registration.php
7+
MODULE_FILES_EXTRA=composer.json LICENSE.md
8+
9+
.PHONY: deps build bump deploy watch package clean nuke dev-create dev-up dev-down dev-nuke
10+
11+
deps: ## Download dependencies
12+
yarn install
13+
14+
build: ## Build styles and scripts
15+
yarn build
16+
17+
bump: ## Bump version in source files based on latest git tag
18+
VERSION=$(VERSION); find Block Console Controller Helper Model etc view -type f -iname "*.php" -exec sed -E -i '' "s/([\t ]+\*[\t ]+@version[\t ]+)(.*)/\1$$VERSION/g" {} +
19+
VERSION=$(VERSION); sed -E -i '' "s/(Version-)(.+)(-orange)/\1$$VERSION\3/g" ./README.md
20+
VERSION=$(VERSION); sed -E -i '' "s/(\"version\": \")(.+)(\")/\1$$VERSION\3/g" ./composer.json
21+
22+
deploy: ## Deploy code to public_html directory
23+
NAMESPACE_PATH=$(NAMESPACE_PATH); mkdir -p "./public_html/app/code/$$NAMESPACE_PATH"
24+
NAMESPACE_PATH=$(NAMESPACE_PATH); rsync -uavq $(MODULE_FILES) "./public_html/app/code/$$NAMESPACE_PATH"
25+
26+
watch: deploy ## Intermittently sync code to public_html directory
27+
fswatch -o $(MODULE_FILES) | xargs -n1 -I{} make deploy
28+
29+
package: bump build ## Package into archive file
30+
rm -rf ./dist
31+
mkdir -p ./dist
32+
VERSION=$(VERSION); NAMESPACE=$(NAMESPACE); zip -r dist/$$NAMESPACE-$$VERSION.zip $(MODULE_FILES) $(MODULE_FILES_EXTRA)
33+
34+
clean: ## Remove generated files and folders
35+
rm -rf ./dist ./.parcel-cache
36+
37+
nuke: clean ## Remove generated & deployment data
38+
rm -rf ./node_modules ./public_html
39+
40+
dev-create: ## Create development environment
41+
composer global config repositories.magento composer https://repo.magento.com/
42+
composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition=2.4.2 ./public_html
43+
cp .magento.docker.yml .magento.setup.params ./public_html
44+
cd public_html && composer require magento/ece-tools -w
45+
cd public_html && ./vendor/bin/ece-docker build:compose --with-test --with-selenium --no-varnish --mode developer
46+
cd public_html && docker-compose up -d
47+
cd public_html && docker-compose run --rm deploy bin/magento setup:install `cat .magento.setup.params | tr '\n' ' '` ;
48+
cd public_html && docker-compose run --rm deploy magento-command deploy:mode:set developer
49+
cd public_html && docker-compose run --rm deploy magento-command module:disable Magento_TwoFactorAuth
50+
cd public_html && docker-compose run --rm deploy magento-command cache:flush
51+
52+
dev-up: ## Spin development environment up
53+
docker-compose -f ./public_html/docker-compose.yml up -d
54+
55+
dev-down: ## Spin development environment down
56+
docker-compose -f ./public_html/docker-compose.yml down
57+
58+
dev-nuke: dev-down nuke ## Spin development environment down
59+
docker volume rm public_html_magento-development-magento-db
60+
61+
help: ## Display available commands
62+
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

README.md

Lines changed: 3 additions & 13 deletions

composer-marketplace.json

Lines changed: 0 additions & 23 deletions
This file was deleted.

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"authors": [
88
{
99
"name": "Rafael Grigorian",
10-
"email": "me@raffi.io"
10+
"email": "development@jetrails.com"
1111
}
1212
],
1313
"repositories": [
@@ -17,7 +17,7 @@
1717
}
1818
],
1919
"autoload": {
20-
"psr-4": { "JetRails\\Cloudflare\\": "src/app/code/JetRails/Cloudflare" },
21-
"files": [ "src/app/code/JetRails/Cloudflare/registration.php" ]
20+
"psr-4": { "JetRails\\Cloudflare\\": "" },
21+
"files": [ "registration.php" ]
2222
}
2323
}

docker-compose.yml

Lines changed: 0 additions & 114 deletions
This file was deleted.

docker-sync.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)