![]() |
Minify CSS and JS - Printable Version +- MyBB Community Forums (https://community.mybb.com) +-- Forum: Development (https://community.mybb.com/forum-161.html) +--- Forum: Suggestions and Feedback (https://community.mybb.com/forum-199.html) +---- Forum: Planned Features (https://community.mybb.com/forum-194.html) +---- Thread: Minify CSS and JS (/thread-178781.html) |
Minify CSS and JS - Lennart Sauter - 2015-09-11 This has been discussed in a different thread already but is not yet announced as planned feature. I'd like to see an automated combination, minifying and gzipping of all CSS and JS files as described here: (2012-12-31, 07:33 PM)faviouz Wrote: In general I think it would be a good idea to have a more unified assets manager (most PHP frameworks offer one anyway) that would also allow some sort of a build process, i.e. concatenate files together and minify/gzip them as much as possible. You would then have a single file for all your styles and another for all the JavaScript (i.e. less HTTP requests), which would be nice for deploying your site to users (as long as you don't go around editing styles and scripts too often). Thanks! RE: Minify CSS and JS - StefanT - 2015-09-11 Quote:In order to aid the process of compiling our SASS files and combining our JavaScript modules, we’re making use of the gulp.js build system. This system compiles our SASS stylesheets into CSS, saves them and then minifies then into “*.min.css” files for use in the main theme. It also combines all of the JavaScript files (including vendor scripts such as jQuery) and minifies them too, along with optimising all of the images used by the theme.http://blog.mybb.com/2015/05/30/2-0-dev-post-3/ RE: Minify CSS and JS - Euan T - 2015-09-11 CSS is already minified in 1.8 (though not combined). The base theme for 2.0 is being developed with gulp.js as part of the workflow to minify and combine both CSS and JS, and to optimize any images. We will likely be expanding this to user themes and JS, though we have not yet designed the implementation or the way it will work yet. RE: Minify CSS and JS - Lennart Sauter - 2015-09-11 So this can be moved to planned features in this case (there is no thread about it in the 2.0 section yet, sorry I missed that blog post Stefan). Minify CSS and JS - Euan T - 2015-09-11 Hi, Your feature suggestion has been accepted as a planned feature to be implemented in MyBB 2.0. Thanks for your contribution! RE: Minify CSS and JS - expat - 2015-10-02 what about combining the CSS in 1.8, instead of making many calls to small CSS files consuming server requests? Can there be a function to to append all the CSS and output the CSS to single flat file or cache? RE: Minify CSS and JS - laie_techie - 2015-10-02 Combining CSS into a single URL may hinder some caching. As an example, global.css is included in all pages, so its content would have to be downloaded (instead of using a cache) for each page type. I would also like some configuration to not minimize CSS and JS while I am tweaking themes and plugins. RE: Minify CSS and JS - expat - 2015-10-04 It would be nice to have both JS and CSS in the backend as data entries.....like CSS cascading as is now.....the developers just need a function to pull them out of DB, cache them as index.css, forumdisplay.css and deliver the exact named file to the correct location ![]() for instance: Quote:global.css should all be in global.css Quote:usercp.css each of these pages should have an extra css for page specific: usercp.php.css, usercp2.php.css, private.php.css EDIT: you can pretty much use Global Templates Used by all themes as a JS repository RE: Minify CSS and JS - StefanT - 2015-10-04 MyBB 2.0 is completely different, talking about 1.8 here makes no sense... |