WordPress, Workflow Tools

xmllint

I recently discovered after trying to import WordPress XML files for a customer that you can use xmllint (within the Command Line or iTerm) to check the validity of the files.

The error message looked like this:

Invalid XML on read in WXR_Large_File_Parser::__construct() for file:///nfs/6a2/156107206/files/2019/01/site-address-here.wordpress.2019-01-09.001.xml_-3.txt (size: 11335507)

After a colleague suggested xmllint, I opened iTerm (equivalent to the Command Line), then made sure to change the directory to where the file were located. For example:

/cd ~/Desktop
xmllint --valid filename.xml

Two files were checked and one of the files produced the following error:

If anyone can translate the error messages (from the screenshot), please let me know!

In the end, I tried the import file again but decided to split the first file 11.3 MB using a WXR splitter and all files were successfully imported. 🎉 🤓

Standard
Productivity, Workflow Tools

Grunt build error behind proxy

While working on a project, I used the Yeoman webapp generator and selected; Bootstrap Sass, jQuery and Modernizr. Everything has worked well, the ‘grunt serve’ and ‘grunt test’ commands, however when I want to run the ‘grunt build’ command to upload the contents of my ‘dist’ folder to a web server, I get prompted with the following error:

Looking for Modernizr references in dist/styles/main.css >> svg
Downloading source files
A server error occurred attempting to download a file: 
Fatal error: connect ETIMEDOUT

I’m not sure if it’s something to do with my bower components or the proxy that I’m sitting behind?

At the moment, the workaround I’m using is to manually add the scripts (jQuery, Modernizr and Bootstrap) to the scripts folder then to link it to my html files. But surely there is a better way to do this?!

Standard
Productivity, Workflow Tools

Grunt-Sass vs Grunt-Contrib-Sass

I was interested to find out what the differences were between Grunt-Sass and Grunt-Contrib-Sass.

Following on from my previous blog post on “Using Yeoman in your workflow“, it was brought to my attention during the Yeoman install when the interactive prompt asked if I wanted to use Libsass to compile Sass.

Yeoman generator Libsass prompt

So I recently asked on Twitter and received the following tweets. Thanks to @sindresorhus for the explanation.

Continue reading

Standard
Productivity, Workflow Tools

Using Yeoman in your workflow

There are tonnes of web development tools to help front-end developers these days that it can start to become overwhelming. I know I was! (Not gonna lie!). So before we begin, I thought I would go through some of the steps of using Yeoman in my web development workflow.

First you’ll need to get a clear picture on what you’d like to achieve and what your end result will be. For me, I wanted to re-design an existing static website to make it responsive (more about RWD on a future blog post).

Continue reading

Standard
Productivity, WordPress, Workflow Tools

YeoPress Review

YeoPress: A Yeoman Generator for WordPress by Wesley Todd

I won’t go into too much detail to explain what YeoPress does but you can read more about it from the creator himself, Wesley Todd. YeoPress: A Yeoman Generator for WordPress, basically installs WordPress via the Command Line/Terminal. It’s also assuming that you’re working locally (which is a good start for developing WordPress themes). So you still need to create your database and you have to know what your database username and password will be (this is to set up your wp-config.php file) For example: Database Username: root, Database Password: empty). Be sure to check your database privileges for editing access too. The steps described by Wesley are easy to understand and the instructions set up are pretty straightforward.

Continue reading

Standard