Skip to content

Commit 858f67a

Browse files
committed
Fixed #85
1 parent a72f56d commit 858f67a

File tree

6 files changed

+17
-9
lines changed

6 files changed

+17
-9
lines changed

Makefile

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,24 @@ nuke: clean ## Remove generated & deployment data
4343
install-from-magento: ## Install module from official Magento repo (for testing)
4444
docker-compose -f ./public_html/docker-compose.yml run --rm build composer require --no-ansi jetrails/magento2-cloudflare:1.3.7
4545

46+
shell: ## Spawn a shell
47+
docker-compose -f ./public_html/docker-compose.yml run --rm deploy bash
48+
4649
dev-create: ## Create development environment
4750
composer global config repositories.magento composer https://repo.magento.com/
48-
composer create-project --repository-url=https://repo.magento.com/ magento/project-$(MAGENTO_EDITION)-edition=$(MAGENTO_VERSION) ./public_html
51+
composer create-project --prefer-dist --repository-url=https://repo.magento.com/ magento/project-$(MAGENTO_EDITION)-edition=$(MAGENTO_VERSION) ./public_html
4952
cp .magento.docker.yml .magento.setup.params ./public_html
53+
cd public_html && ln -s ../docker-compose.override.yml ./docker-compose.override.yml
5054
cd public_html && composer require magento/ece-tools -w
51-
cd public_html && ./vendor/bin/ece-docker build:compose --with-test --with-selenium --no-varnish --mode developer
55+
cd public_html && ./vendor/bin/ece-docker build:compose --no-varnish --mode production
5256
cd public_html && docker-compose up -d
53-
cd public_html && docker-compose run --rm deploy bin/magento setup:install `cat .magento.setup.params | tr '\n' ' '` ;
54-
cd public_html && docker-compose run --rm deploy magento-command deploy:mode:set developer
57+
cd public_html && docker-compose run --rm deploy composer self-update --2
58+
cd public_html && docker-compose run --rm deploy magento-command setup:install `cat .magento.setup.params | tr '\n' ' '` ;
5559
cd public_html && docker-compose run --rm deploy magento-command module:disable Magento_TwoFactorAuth
5660
cd public_html && docker-compose run --rm deploy magento-command cache:flush
61+
cd public_html && docker-compose run --rm deploy magento-command deploy:mode:set production -s
62+
cd public_html && docker-compose run --rm deploy magento-command setup:static-content:deploy --jobs 4
63+
cd public_html && docker-compose run --rm deploy magento-command setup:di:compile
5764

5865
dev-up: ## Spin development environment up
5966
docker-compose -f ./public_html/docker-compose.yml up -d

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@
2929
},
3030
"scripts": {
3131
"build:styles": "parcel build --no-source-maps --dist-dir $npm_package_entrypoints_bundle $npm_package_entrypoints_style",
32+
"postbuild:styles": "mv $npm_package_entrypoints_bundle/index.css $npm_package_entrypoints_bundle/index.min.css",
3233
"build:scripts": "parcel build --no-source-maps --dist-dir $npm_package_entrypoints_bundle $npm_package_entrypoints_script",
33-
"build:all": "parcel build --no-source-maps --dist-dir $npm_package_entrypoints_bundle $npm_package_entrypoints_script $npm_package_entrypoints_style",
34-
"build": "rm -rf $npm_package_entrypoints_bundle && yarn build:all"
34+
"postbuild:scripts": "mv $npm_package_entrypoints_bundle/index.js $npm_package_entrypoints_bundle/index.min.js",
35+
"build": "rm -rf $npm_package_entrypoints_bundle && yarn build:styles && yarn build:scripts"
3536
}
3637
}

view/adminhtml/layout/cloudflare_dashboard_view.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd" >
66
<head>
77
<title>Cloudflare Dashboard</title>
8-
<link src="JetRails_Cloudflare::bundle/js/index.js" />
9-
<css src="JetRails_Cloudflare::bundle/scss/index.css" />
8+
<link src="JetRails_Cloudflare::bundle/index.min.js" />
9+
<css src="JetRails_Cloudflare::bundle/index.min.css" />
1010
</head>
1111
<body>
1212
<referenceContainer name="content" >

view/adminhtml/web/bundle/index.min.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.

view/adminhtml/web/bundle/scss/index.css

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)