npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@dgrammatiko/convert-template

v1.0.4

Published

Convert old templates to new (with support for child templates)

Downloads

4

Readme

Joomla Template converter

Joomla 4.1 (this is speculative) will support templates with the ability to create child template. Actually the code already exists since 4.0 and this Pull Request, so this should be fairly safe right now. The UI is missing anything meaningful right now (Joomla version <4.1) so although the new mode is supported but is lacking the UI for managing them efficiently, hopefully this Pull Request will be done and merged into 4.1. So, why do we need this convertor in the first place? Well, the new mode templates coming with some changes.

Breaking Changes

So the new mode templates come with some breaking changes:

  • The manifest needs <inheritable>1</inheritable> to indicate the installer that this supports child templates
  • The static assets should be placed in the /media/templates/(site || administrator)/(template name). Static assets are all those files that are directly fetched from the browser (eg.: .css, .js, .png... Basically the folders css,js,images).
  • The new mode should support namespace by default. At the time of righting this, the decision is not made yet but there's a Pull Request.

How it works

This tool will convert any template (that's not already supporting the new mode) to the new mode. It supports:

  • templates as an intallable .zip file
  • templates in an existing folder

You will need Node and npm installed in your machine and then runing either:

npx @dgrammatiko/convert-template templateFolder

or

npx @dgrammatiko/convert-template template.zip

The result will be a zip file name inheritable_templateFolder.zip

Gotchas

  • The tool will not patch the PHP files to the correct namespace.

  • The tool will not fix wrong instances of static assets inclusions. Use always the new Web Assets or at the very least the HTMLHelper::_()

  • The tool will not fix the hardcoded instances of $template->template. These should be hardcoded to be non dynamic eg: instead of '/template/' . $template->template . '/css' should be written as '/template/templateName/css'