Next episode of the “how to bore people to death” series: Ive - TopicsExpress



          

Next episode of the “how to bore people to death” series: Ive just came up with a (hopefully) workable modularization scheme for my WordPress code. The method I read before, “functionality plugins”, didnt seem optimal at all, because it relies on many separate .css and .js files to load, thereby interfering with website performance best practices. And the other method, simply creating a php-include folder, also seems pretty useless for complex functionality, because it doesnt help storing the relevant JS and CSS code, and simply storing these in regular theme files destroys the pluggability. So I figured that Ill create a “modules” folder instead, where I put a .php, .css and .js file for each module. The functions.php file will run a function to automatically include all PHP files in the folder. To a similar end (and this is the real awesomeness), Ill mend the Grunt Task Runners JS (grunt-contrib-uglify) and CSS (grunt-contrib-compass) configuration to watch this folder for *.js and *.(s)css files respectively, and concat and minify them into the themes main “style.css” and “main.min.js” respectively. If the initial usage goes well, Ill refactor all main functionality code of the feminist site according to this scheme. This will most likely create pluggable modules for my future developments. Though, I still think that complete modularity is unachievable on custom built sites, because there is simply too much brand-based styling on the DOM elements of the various functionality.
Posted on: Sun, 10 Nov 2013 14:00:14 +0000

Trending Topics



Recently Viewed Topics




© 2015