How do I easily remove unnecessary/unused asset files (CSS/JS)?

2 replies · opened Sep 13, 2022

BbzlatkovSep 13, 2022

Hello,

Is there a common/easy practice, after development using one of the templates is finished, to remove all the unnecessary CSS and JS files which are still in the respective folders? I'm particularly interested in the ones in css/components, css/imports, js, js/components and js/particles. The goal is to have the leannest possible website.

What I'm also asking is - if I remove all js files which are not explicitly included in the html pages, will the site still work or are there dependencies which may be called upon the some of the js plugins, for instance?

Thank you!

SSemicolon WebSTAFFSep 13, 2022

Hello,

This is Definitely Possible but this comes under Customization, so you can consider following the steps below:

  1. We recommend generating a Custom Package here: http://docs.semicolonweb.com/docs/getting-started/installation/ according to the HTML Files you need for your website and our Package Generator will sort the Files for you to download. Suppose, you need the demo-seo.html Template, simply choose this File in the Package Generator and then press the Generate button. A Custom Package will be generated for you only based on your selected file.

  2. For CSS, we recommend you use the style-imports.css File to include/exclude CSS according to your needs.

  3. For JS, simply remove the js/plugins.min.js File from the Page and everything else will work automatically. Our smart JS Functions will automatically include only those JS Plugins that are required on the Page. Additionally, please make sure you keep the Files in the js/ Folder intact as they are required by the js/functions.js File, to detect and include plugins on the respective pages as required.

Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

BbzlatkovSep 13, 2022

Thank you! I will give the Generator a try.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard