How to painlessly move Kickoff’s assets directory

Zander Martineau
Feb 10, 2016 · 1 min read

Kickoff’s assets directory resides in the root of the repo, it contains the framework’s source and compiled files. What if you needed the assets directory, not to be served from there but from another location? For example, a Wordpress theme would ideally serve assets from within the wp-content/themes/ directory. Wouldn’t trying such a thing be a massive pain in the arse? Normally I’d agree, but in Kickoff’s case its simple because we have a global config that allows developer to changes these kinds of things with extreme ease.

Here’s what you do

Apart from manually moving the directory, you need to edit 3 lines of Kickoff’s global Grunt config, in _grunt-configs/config.js to be exact. Change the values on lines 9–11 to point to the new location, for example:

srcDir  : ‘wp-content/themes/your-theme/assets/src’,
distDir : ‘wp-content/themes/your-theme/assets/dist’,
tempDir : ‘wp-content/themes/your-theme/assets/temp’,

And that’s it. But there’s more…

As a bonus, you could separate the locations for assets/src andassets/dist as there’s no reason why they need to be together.

#tipsForKickoff

To find more tips like this for Kickoff, lookout for the #tipsForKickoff hashtag

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store