Giter Site home page Giter Site logo

preupver-plugin's Introduction

PreUpVer Loader (1.0.0)

Introduction

PreUpVer is a versatile JavaScript library designed to automatically update the version numbers of library scripts in your documentation. It identifies specific <pre> tags on your webpage and updates them with the latest version tag fetched from a specified repository, ensuring your documentation always displays up-to-date information.

How It Works

PreUpVer operates by searching for <pre> tags with a designated class (preupver) and using their data attributes to perform version updates. It simplifies the process of keeping your library references up-to-date in documentation.

Automatic Detection and Updating

When the webpage loads, PreUpVer finds all <pre> tags marked with the preupver class. It then extracts necessary details from their data attributes and updates each tag with the latest library version.

Usage

  1. Marking <pre> Tags:

    Add the class="preupver" to <pre> tags in your HTML and define the required data attributes for automatic updating:

    <pre id="unique-id" class="preupver"
         data-api-url="https://api.github.com/repos/username/library/tags"
         data-description="Description of the library script"
         data-url="https://cdn.jsdelivr.net/gh/username/library@${version}/dist/library.min.js">
    </pre>

    Replace unique-id, username, library, and other placeholders with your specific details.

  2. Attributes Explained:

    • id: A unique identifier for the <pre> tag.
    • data-api-url: The API URL to fetch the latest library version.
    • data-description: A brief description of the library script.
    • data-url: The URL of the script, where ${version} will be replaced with the latest version number.

Example

Check out the tests folder for the examples we use to test if this library works as expected.

Build Details

This plugin was build with a Joomla Automated Component Builder. Developed by Llewellyn van der Merwe

preupver-plugin's People

Contributors

llewellynvdm avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.