WordCamp Grand Rapids 2018

I got to go to WordCamp Grand Rapids 2018. Great event at a great location. Good speakers and full of that awesome, inclusive, laid-back WordPress culture vibe. If you ever have a chance, check out a WordPress WordCamp conference local to you – I’ve been pleasantly impressed so far.

Brief thoughts on React and Vue

I’ve been playing with React and Vue, getting a feel for what they can do and how they approach solving certain problems. While my knowledge of both are very surface-level at the moment, I’m leaning towards Vue’s approach mainly for one reason: pragmatism.

Vue doesn’t require any specific workflow or tooling, and it can work right out of the box with existing code and architecture. It also isn’t so dogmatic about data-binding as React is. Vue is very pragmatic – I like that. Makes it much easier to start using and working with.

Shell scripts for easier website scaffolding part 2

Another bit of Bash script fun for prepping a directory or file for deployment.
echo "Which directory or file do you want to deploy?"
read sourcedirectory
echo "ZIP'ing up directory/file"
zip -r --exclude=\.git --exclude=\node_modules --exclude=\bower_components --exclude=\.npm --exclude=\.idea --exclude=\.hg $sourcedirectory $sourcedirectory
echo "Syncing ZIP'ed folder/file to Deploy directory"
rsync -r --progress $sourcedirectory.zip ~/Deploy
echo "Done! You can find your deployment package $sourcedirectory.zip here: ~/Deploy (type cd ~/Deploy to go there)

So some explanations for those not too familiar with shell scripts – this function goes in your bash profile (.bash_profile in your user account, if it doesn’t exist you can create it). read is a command that asks for user input – we’re asking the user to tell us which file or directory they want us to run on. Then we zip up the file/directory making sure to exclude things we don’t want deployed to production and save the ZIP’ed file name the same as the directory we’re “deploying”. And then we use rsync to copy the ZIP archive to our deploy folder.

You can totally tweak this so that instead of zipping the directory or files up, it could just rsync the directory or files to a remote directory – the skies the limit (or really your user privileges).