Pls make that thing more easy :)

Would be great to have a Sage (Lite) version. I used roots with grunt few years ago for me it was fine. But today i need to install tons of stuff to get the thing running. Even when just installing Sage - and do gulp production I don´t get a “dist” folder (like i do when using yeoman-generators) - coming from the graphic front end way it is very hard to learn. I wld like to buy the book so pls include a paypal option - and I hope there is everything init - how to setup the whole environment. Sry I am just confused.

Sage should be fairly quick to get up and running. Are these the steps you’re trying?

  1. Install gulp and Bower globally with npm install -g gulp bower
  2. Navigate to the theme directory, then run npm install
  3. Run bower install
  4. Run gulp (gulp --production can be used to generate assets for production like the dist folder you mentioned)

Let me know if you’re doing that and still running into issues.

1 Like

Hey Pete,

thanks for your reply. I am using “yeoman” with “gulp generators”. So these steps are clear to me.

My concerns starts with all that structure of setting up the enviroment. So do I start setting up my project with a blank “Trellis” environment put “Bedrock” inside and set the up “Sage” in the theme folder?

Just for test purpose I installed Sage with Bower, Gulp executed the “gulp --production” and the “dist” folder is created - than I upload the whole theme folder via FTP on a Wordpress theme folder via FTP - I know that is not the way its ment to be (bower and node components are included into the theme folder ).

Would be good to know: How the “pro`s” set up there local environment when using all the powerful tools together. So what wld be step 1,2,3 how is this nested into each other?

I hope you` ve got me. Thx.

The book definitely doesn’t have “everything” in it, and setting up the environment is already covered in the project README and docs.

Roots with Grunt still used npm — what exact issues are you having?

Hey Ben,

npm gulp, bower is running and I have a created “dist” folder (in my “Sage” theme folder) after executing “gulp --production”.

So I ve uploaded the whole theme folder (via FTP) and leave out" bower_components" and"node_modules". Than it seems to work. But this is not they way it should work right? So what wld be the best step by step to have a final “theme” folder with all needed files init to deploy or upload via FTP?

Thanks in advance and please excuse my newbish questions but I need a kind of frame. And maybe you can add a Paypal option to the book.

The Trellis the Trellis docs should help you get up and running with that. Use the Roots Example Project as a reference along with this. That’ll help to clear up anything like the file structure. Once you have your local environment set up (“Local Development Setup” in the Trellis Docs) you’ll be able to go through those steps for setting up the Sage theme. There’s deployment info specific to Trellis in those docs, but the quick answer would be that you won’t need to upload anything that’s just used locally. The dist folder is also used instead of the assets folder for production.

1 Like

Do you have rsync access to the server? If so, you can do this as a bash one-liner. Though, maybe more command line isn’t what you’re looking for! :]

First, create a file called exclude.txt. Inside of it add anything you don’t want to push up, one per line:

node_modules
bower_components
super-private-folder

Then run this command from the same folder with that file:
rsync -avz --exclude-from='exclude.txt' /path/to/local/theme your_username@12.34.56.78:/remote/path/to/theme/

Note that rsync syntax varies from OS to OS so you may need to fidget with the quotes. Definitely test it on non-critical folders first!

You can save this into a bash script and just call it when you want to deploy. It’s a little bit of set up but being able to just type ./deploy.sh is a lot faster than loading an FTP client.

If FTP is “the way” for now, most have filters you can set that work just like the exclude file above. That way you can just drag the folder over and the program will skip those files/folders.

Here is a good example project created by roots.io:
https://github.com/roots/roots-example-project.com

Best practice setup is to use Vagrant for Local Dev: https://roots.io/trellis/docs/local-development-setup/

1 Like

Thanks for your posts. I am still “developing” in a bad way. “Installed” everything on a Webhost, edit the sage theme locally - do a gulp -production and - uploading the changed files into my sage theme directory via FTP. Yes, shame on me :frowning:

@botta it can take a while to turn a ship. We’re just moving beyond the scenario you describe at our agency simply from legacy habits and hosting environments that don’t lend themselves to automated deploys.

You’re definitely not alone; the trick is knowing where you’re going.