Without composer, how can I install the theme sage?
My online test dev. hosting server does not allow users ssh access.
My local PC is MBP. How can I do for theme install?
You can install on your workstation/build and upload all artifacts directly to production.
As @strarsis suggests, you can do everything locally and then run yarn build:production
before uploading the theme to your hosting server.
Just ensure that you exclude the node_modules
folder from the upload.
Even better, use a tool like DeployBot to build your theme automatically when you push it up to GitHub, and then have it SFTP everything into your server. Itās easy to setup.
@Stephen. Iām thinking moving from Sage 8 to 9 and a lot of stuff are completely new to me (webpack, blade, composer). Iām thinking about when I have to publish the code / theme. I can do yarn run build:production
and the upload the files via ftp (not a bid deal because itās a one shot theme) but Iām thinking about how to handle the files on the web server.
I mean, have I to install composer? How can I know if it supports blade? Are these logical questions OR I just need to upload the theme folder without node_modules
folder?
@dghez, Iām going through the same process at the moment - the last theme I made was with Sage 8 and now Iām working on a new one with Sage 9. Itās a bit of a learning process with these new tools and the documentation is still not complete but with the forums, you should always be able to figure out what is needed.
All you need to do is upload the files in the theme folder. Thereās no need to install Composer on your web server.
You can think of Composer as the PHP equivalent of Yarn - it manages and fetches the PHP dependencies and puts them in the vendor
folder. The files will be there once you have run composer install
(note: this will be done for you automatically if you set up your theme via the composer create-project roots/sage your-theme-name dev-master
command).
It can be confusing at first but once youāve done it a few times, it makes a lot more sense
@JulienMelissas - DeployBot looks great but it might be overkill for this case (plus it costs at least $15/month). In the past Iāve used PHPloy with local Git repositories with good results. Or even simpler, I sometimes use Forklift to sync changes via SFTP.
@Stephen thanks for the clarification about moving stuff online, Iāll test when Iāll be ready to release.
Now Iām currently re-writing everything Iāve done on sage 8 (I started this prj a week ago) into sage 9 theme, I decided to rewrite everything to have consistency with the new approach, using blade
templating markup. Thankfully Iāve wrote some snippet some time ago in handlebars
so blade itās not completely new because is similar in some aspects.
Btw, to be honest for now the most painful stuff was upgrade to php7. It took a lot of time to figure out how.
Youāre welcome
Itās a shame about the situation with Bower and Bootstrap but I think youāll be in a good place once youāre comfortable with Sage 9.
Why was upgrading to PHP 7 so painful? Do you mean on the server or with your local development machine? I used Homebrew for my local PHP 7 installation and most of the web hosts I work with have it, so it was quite a smooth process. I remember in the past that wasnāt always the case!
Yeah, but I mean. Bower is dead, we need to move forward. I think that in another way itās a good thing, it force people to learn new staff. Iāve never used webpack, so finally itās time to understand a bit how it works
No way. I tried with brew install php70
as seen on on Medium but after the upgrade with homebrew
i still see php 5.6. I solved using export PATH="$(brew --prefix homebrew/php/php70)/bin:$PATH"
in the terminal when I need php 7. So technically my machine still run as default php 5.6
Totally agree, sometimes we just need a push If youāre learning Webpack, Iād recommend this video.
Thatās strange, I didnāt need to do any of thatā¦ At least you got it to work! For me, the most pain Iāve had has been with Node / NPM versionsā¦