Skip to content

jop-software/current-year

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@jop-software/current-year

A simple web component that displays the current year.

Installation

You can install the package via npm (or compatible package managers):

npm install @jop-software/current-year

Or include it directly in your HTML via a CDN:

<script type="module" src="https://cdn.jsdelivr.net/npm/@jop-software/current-year/dist/index.mjs"></script>

Usage

When using a build system like Vite or tools like Astro, you need do import the package as follows:

import "@jop-software/current-year";

After that or when using the CDN version, the <current-year> web component will be available for use in your HTML and can be used like this:

<footer>
  <p>&copy; <current-year></current-year></p>
</footer>

Development

To build the project locally, clone the repository and run:

pnpm install
pnpm build

Publish to npm

pnpm publish --access public

License

This project is licensed under the MIT License. See the LICENSE file for details.