-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrating from NPM to GitHub for hosting IIFE file
- Loading branch information
1 parent
cedfa49
commit b03b797
Showing
10 changed files
with
41 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[![](https://cdn.jsdelivr.net/gh/patelka2211/dominar@master/website-stuff/media/poster.png)](https://patelka2211.github.io/dominar) | ||
[![](https://cdn.jsdelivr.net/gh/patelka2211/dominar/website-stuff/media/poster.png)](https://patelka2211.github.io/dominar) | ||
|
||
# Dominar | ||
|
||
|
@@ -13,20 +13,22 @@ Visit [https://patelka2211.github.io/dominar/](https://patelka2211.github.io/dom | |
## Installation | ||
|
||
[![npm (scoped)](https://img.shields.io/npm/v/@patelka2211/dominar)](https://www.npmjs.com/package/@patelka2211/dominar) | ||
[![npm bundle size (scoped)](https://img.shields.io/bundlephobia/min/@patelka2211/dominar)](https://bundlephobia.com/package/@patelka2211/dominar@1.1.9) | ||
[![npm bundle size (scoped)](https://img.shields.io/bundlephobia/min/@patelka2211/dominar)](https://bundlephobia.com/package/@patelka2211/dominar@1.2.0) | ||
[![npm](https://img.shields.io/npm/dy/@patelka2211/dominar)](https://www.npmjs.com/package/@patelka2211/dominar) | ||
[![jsDelivr hits (npm scoped)](https://img.shields.io/jsdelivr/npm/hy/@patelka2211/dominar)](https://cdn.jsdelivr.net/npm/@patelka2211/[email protected]/) | ||
[![jsDelivr hits (npm scoped)](https://img.shields.io/jsdelivr/npm/hy/@patelka2211/dominar)](https://cdn.jsdelivr.net/gh/patelka2211/[email protected]/) | ||
|
||
<!-- [![jsDelivr hits (npm scoped)](https://img.shields.io/jsdelivr/gh/hy/patelka2211/dominar)](https://cdn.jsdelivr.net/gh/patelka2211/[email protected]/) --> | ||
|
||
To install Dominar using npm, run the following command: | ||
|
||
```sh | ||
npm i @patelka2211/dominar | ||
``` | ||
|
||
Alternatively, you can include [Dominar's IIFE file](https://cdn.jsdelivr.net/npm/@patelka2211/dominar@1.1.9/Dominar.iife.js) in your website using a `<script>` tag: | ||
Alternatively, you can include [Dominar's IIFE file](https://cdn.jsdelivr.net/gh/patelka2211/dominar@1.2.0/Dominar.js) in your website using a `<script>` tag: | ||
|
||
```html | ||
<script src="https://cdn.jsdelivr.net/npm/@patelka2211/dominar@1.1.9/Dominar.iife.js"></script> | ||
<script src="https://cdn.jsdelivr.net/gh/patelka2211/dominar@1.2.0/Dominar.js"></script> | ||
``` | ||
|
||
## Examples | ||
|
@@ -88,10 +90,10 @@ addEventListeners(document.body, { | |
|
||
### When included as a `<script>` tag in a website. | ||
|
||
If the script tag is not already included in the `<head>` tag, please add the following script tag to include [Dominar's IIFE JavaScript](https://cdn.jsdelivr.net/npm/@patelka2211/dominar@1.1.9/Dominar.iife.js) file. | ||
If the script tag is not already included in the `<head>` tag, please add the following script tag to include [Dominar's IIFE JavaScript](https://cdn.jsdelivr.net/gh/patelka2211/dominar@1.2.0/Dominar.js) file. | ||
|
||
```html | ||
<script src="https://cdn.jsdelivr.net/npm/@patelka2211/dominar@1.1.9/Dominar.iife.js"></script> | ||
<script src="https://cdn.jsdelivr.net/gh/patelka2211/dominar@1.2.0/Dominar.js"></script> | ||
``` | ||
|
||
```html | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
import dts from "rollup-plugin-dts"; | ||
|
||
const time = new Date(), | ||
const currentDate = new Date(), | ||
options = { year: "numeric", month: "long", day: "numeric" }, | ||
formattedDate = currentDate.toLocaleDateString("en-US", options), | ||
banner = `/** | ||
* [**Dominar by KP**](https://www.npmjs.com/package/@patelka2211/dominar/) | ||
* **Dominar** from KPVERSE | ||
* | ||
* Dominar is a powerful library designed to make it easy for developers to manipulate the Document Object Model (DOM) and create dynamic HTML content. Dominar empowers you to take control of your web development projects like a pro. Unleash the power to dominate the DOM with Dominar. | ||
* Updated on ${formattedDate}. | ||
* | ||
* Copyright © 2023-present, Kartavya Patel. All rights reserved. | ||
* | ||
* @author Kartavya Patel <[email protected]> | ||
* | ||
* @license {@link https://github.com/patelka2211/dominar/blob/main/LICENSE MIT} | ||
* | ||
* @copyright Kartavya Patel ${time.getFullYear()} | ||
* | ||
* Last updated at : ${time.toISOString()} | ||
*/`; | ||
|
||
export default [ | ||
{ | ||
input: "./lib/index.js", | ||
output: { | ||
file: "./Dominar.iife.js", | ||
file: "./Dominar.js", | ||
format: "iife", | ||
name: "Dominar", | ||
banner: banner, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/bin/bash | ||
|
||
terser "./js/index.iife.js" -c -m -o "./js/index.iife.js" | ||
terser "./js/index.bundle.js" -c -m -o "./js/index.bundle.js" |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
export default { | ||
input: "./js/index.js", | ||
output: { | ||
file: "./js/index.iife.js", | ||
file: "./js/index.bundle.js", | ||
format: "iife", | ||
}, | ||
}; |