Building a Tumblr theme with GruntJSPosted 02.02.2014
Building custom themes for Tumblr
Grunt to the rescue.
The Gruntfile I created does the following: compile less files, add a list of css files as inline style, copy the built file to clipboard and remove the generated files. Running
grunt will place the theme in your clipboard so you can head over to Tumblr and paste it into the editor. Even better it is possible to run
grunt watch to do this whenever a file is saved.
The cookiecutter template
I have created a cookiecutter template with a Gruntfile that generates the theme and places it in the clipboard like I described above. To use the cookiecutter project template run the command below. If you haven't heard of cookiecutter take a look at the documentation.
In the future
It would be awesome if all it took to update the theme was
grunt deploy. We will have to stick with pasting it for now. That said any feedback, requests or pull-requests are highly appreciated.