Skip to content

Commit

Permalink
feat: add umd bundling (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
MMMJB authored Jul 24, 2024
2 parents 921aea9 + 08badac commit 507b4da
Show file tree
Hide file tree
Showing 8 changed files with 510 additions and 172 deletions.
29 changes: 11 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,12 @@
<h1 align="center">
<img width="24" height="24" src="./demo/public/favicon.svg" />
Launched
<a href="https://launched.tech">Launched</a>
<p align="center">
<a href="https://npmjs.com/package/launched" title="Package Size"><img src="https://img.shields.io/bundlephobia/minzip/launched" alt="Package Size"></a>
<a href="https://npmjs.com/package/launched" title="Version"><img src="https://img.shields.io/npm/v/launched.svg" alt="Version"/a>
<a href="https://npmjs.com/package/launched" title="Downloads"><img src="https://img.shields.io/npm/dm/launched.svg" alt="Downloads"></a>
</p>
</h1>
<!-- <p align="center">
<a title="Download" href="https://quilljs.com/docs/quickstart"><strong>Download</strong></a>
&#x2022;
<a title="Documentation" href="https://quilljs.com/docs/quickstart"><strong>Documentation</strong></a>
&#x2022;
<a title="Contributing" href="https://github.com/slab/quill/blob/main/.github/CONTRIBUTING.md"><strong>Contributing</strong></a>
&#x2022;
<a title="Interactive Demo" href="https://quilljs.com/playground/"><strong>Interactive Demo</strong></a>
</p>
<p align="center">
<a href="https://npmjs.com/package/quill" title="Package Size"><img src="https://img.shields.io/bundlephobia/minzip/quill" alt="Package Size"></a>
<a href="https://npmjs.com/package/quill" title="Version"><img src="https://img.shields.io/npm/v/quill.svg" alt="Version"></a>
<a href="https://npmjs.com/package/quill" title="Downloads"><img src="https://img.shields.io/npm/dm/quill.svg" alt="Downloads"></a>
</p>
<hr/>
-->

Launched is a tool to make website content editable to clients with no codebase access or coding knowledge required. It was created by [Michael Beck](https://linkedin.com/in/michaelbeck0) for the [Launch](https://launchsite.tech) platform.

Expand All @@ -39,7 +28,11 @@ npm install launched

```html
<!-- Include the Launched library -->
<script src="https://cdn.jsdelivr.net/npm/launched/dist/index.js"></script>
<script type="module" src="https://cdn.jsdelivr.net/npm/launched/dist/bundle.js"></script>

<!-- Include React and ReactDOM dependencies -->
<script crossorigin src="https://cdn.jsdelivr.net/npm/react@17/umd/react.production.min.js"></script>
<script crossorigin src="https://cdn.jsdelivr.net/npm/react-dom@17/umd/react-dom.production.min.js"></script>
```

## Getting started
Expand Down
16 changes: 0 additions & 16 deletions demo/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,7 @@

<link rel="shortcut icon" href="favicon.svg" type="image/x-icon" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200"
rel="stylesheet"
/>
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
rel="preload"
as="style"
href="https://fonts.googleapis.com/css2?family=Amatic+SC:wght@400;700&family=Caveat:wght@400;500;600;700&family=Comfortaa:wght@300;400;500;600;700&family=Courier+Prime:wght@400;700&family=DM+Mono:wght@300;400;500&family=EB+Garamond:wght@400;500;600;700;800&family=Gilda+Display&family=Happy+Monkey&family=Inter:wght@100;200;300;400;500;600;700;800;900&family=Lobster&family=Merriweather:wght@300;400;700;900&family=Montserrat:wght@100;200;300;400;500;600;700;800;900&family=Open+Sans:wght@300;400;500;600;700;800&family=Oswald:wght@200;300;400;500;600;700&family=Playfair+Display:wght@400;500;600;700;800;900&family=Poppins:wght@100;200;300;400;500;600;700;800;900&family=Quicksand:wght@300;400;500;600;700&family=Roboto+Mono:wght@100;200;300;400;500;600;700&family=Roboto:wght@100;300;400;500;700;900&display=swap"
/>
<link
rel="stylesheet"
media="print"
id="fonts"
onload="this.onload=null;this.removeAttribute('media');"
href="https://fonts.googleapis.com/css2?family=Amatic+SC:wght@400;700&family=Caveat:wght@400;500;600;700&family=Comfortaa:wght@300;400;500;600;700&family=Courier+Prime:wght@400;700&family=DM+Mono:wght@300;400;500&family=EB+Garamond:wght@400;500;600;700;800&family=Gilda+Display&family=Happy+Monkey&family=Inter:wght@100;200;300;400;500;600;700;800;900&family=Lobster&family=Merriweather:wght@300;400;700;900&family=Montserrat:wght@100;200;300;400;500;600;700;800;900&family=Open+Sans:wght@300;400;500;600;700;800&family=Oswald:wght@200;300;400;500;600;700&family=Playfair+Display:wght@400;500;600;700;800;900&family=Poppins:wght@100;200;300;400;500;600;700;800;900&family=Quicksand:wght@300;400;500;600;700&family=Roboto+Mono:wght@100;200;300;400;500;600;700&family=Roboto:wght@100;300;400;500;700;900&display=swap"
/>
</head>
<body>
<div id="root"></div>
Expand Down
106 changes: 106 additions & 0 deletions demo/public/static-demo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<base href="/" />
<title>Launched</title>

<link rel="shortcut icon" href="favicon.svg" type="image/x-icon" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />

<!-- Include the Launched library -->
<script type="module" src="/dist/bundle.js"></script>
<!-- Include necessary React and ReactDOM libraries -->
<script
crossorigin
src="https://cdn.jsdelivr.net/npm/react@17/umd/react.production.min.js"
></script>
<script
crossorigin
src="https://cdn.jsdelivr.net/npm/react-dom@17/umd/react-dom.production.min.js"
></script>
<!-- Initialize Launched -->
<script type="module" defer>
const { Launched } = launched;

const l = new Launched();
console.log(l);
</script>

<style>
*,
*::before,
*::after {
margin: 0;
padding: 0;
box-sizing: border-box;
list-style: none;
}

body {
padding: 24px;
display: flex;
flex-direction: column;
gap: 24px;
}

ul {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 12px;

li {
padding: 12px;
border: 1px solid #000;
border-radius: 4px;
}
}
</style>
</head>
<body>
<h1 data-tag="heading">This is a heading.</h1>
<p data-tag="paragraph">
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Ea quia
cupiditate architecto perferendis incidunt praesentium neque expedita
ipsam suscipit libero quae dolores veniam quasi, necessitatibus molestiae
dignissimos repellat ullam laborum numquam voluptatem. Officiis eos
dolorem velit a voluptas animi pariatur sint consequatur facilis quaerat?
Magnam asperiores delectus suscipit, ab odit cum voluptas. Corporis,
corrupti! Laudantium explicabo accusamus placeat, sint error, fugit
excepturi nam laboriosam earum blanditiis provident amet, iste modi cum
eveniet dolorum dolores commodi ipsa exercitationem quis eius incidunt
non. Saepe expedita quam ea. Quasi molestiae natus minus, nesciunt ab
exercitationem, voluptate facilis quis obcaecati magni pariatur possimus
molestias, nulla consequuntur voluptas necessitatibus rerum placeat
perferendis dignissimos cupiditate? Assumenda maxime delectus distinctio?
Recusandae hic porro nostrum, ab, maiores voluptatem minima, esse fugit
sunt consequuntur impedit facere cum!
</p>
<h2>These are some cards.</h2>
<ul>
<li>
<h3 data-tag="cards-0-title">Card 1</h3>
<p data-tag="cards-0-description">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam,
quod.
</p>
</li>
<li>
<h3 data-tag="cards-1-title">Card 2</h3>
<p data-tag="cards-1-description">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam,
quod.
</p>
</li>
<li>
<h3 data-tag="cards-2-title">Card 3</h3>
<p data-tag="cards-2-description">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam,
quod.
</p>
</li>
</ul>
</body>
</html>
69 changes: 3 additions & 66 deletions demo/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -758,10 +758,6 @@ video {
animation: box-pulse 4s infinite ease-in-out;
}

.static{
position: static;
}

.fixed{
position: fixed;
}
Expand Down Expand Up @@ -827,11 +823,6 @@ video {
margin-bottom: -2.5rem;
}

.-mx-10{
margin-left: -2.5rem;
margin-right: -2.5rem;
}

.-mb-10{
margin-bottom: -2.5rem;
}
Expand Down Expand Up @@ -884,10 +875,6 @@ video {
height: 1.5rem;
}

.h-64{
height: 16rem;
}

.h-full{
height: 100%;
}
Expand Down Expand Up @@ -921,14 +908,6 @@ video {
width: max-content;
}

.max-w-48{
max-width: 12rem;
}

.max-w-7xl{
max-width: 80rem;
}

.max-w-\[500px\]{
max-width: 500px;
}
Expand Down Expand Up @@ -970,10 +949,6 @@ video {
grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-5{
grid-template-columns: repeat(5, minmax(0, 1fr));
}

.grid-cols-6{
grid-template-columns: repeat(6, minmax(0, 1fr));
}
Expand Down Expand Up @@ -1018,14 +993,6 @@ video {
gap: 1.25rem;
}

.gap-6{
gap: 1.5rem;
}

.gap-\[2vw\]{
gap: 2vw;
}

.overflow-hidden{
overflow: hidden;
}
Expand All @@ -1038,10 +1005,6 @@ video {
border-radius: 1rem;
}

.rounded-3xl{
border-radius: 1.5rem;
}

.rounded-full{
border-radius: 9999px;
}
Expand Down Expand Up @@ -1106,10 +1069,6 @@ video {
padding: 2.5rem;
}

.p-14{
padding: 3.5rem;
}

.p-2{
padding: 0.5rem;
}
Expand All @@ -1128,11 +1087,6 @@ video {
padding-right: 0.75rem;
}

.px-6{
padding-left: 1.5rem;
padding-right: 1.5rem;
}

.py-2{
padding-top: 0.5rem;
padding-bottom: 0.5rem;
Expand Down Expand Up @@ -1163,18 +1117,10 @@ video {
padding-top: 2.5rem;
}

.pt-20{
padding-top: 5rem;
}

.text-center{
text-align: center;
}

.font-sans{
font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

.text-3xl{
font-size: 1.875rem;
line-height: 2.25rem;
Expand All @@ -1200,11 +1146,6 @@ video {
line-height: 1.25rem;
}

.text-sm\/\[19\.6px\]{
font-size: 0.875rem;
line-height: 19.6px;
}

.text-xl{
font-size: 1.25rem;
line-height: 1.75rem;
Expand Down Expand Up @@ -1370,8 +1311,9 @@ video {
padding: 2.5rem;
}

.sm\:p-20{
padding: 5rem;
.sm\:px-10{
padding-left: 2.5rem;
padding-right: 2.5rem;
}

.sm\:py-1{
Expand All @@ -1384,11 +1326,6 @@ video {
padding-bottom: 10rem;
}

.sm\:px-10{
padding-left: 2.5rem;
padding-right: 2.5rem;
}

.sm\:pt-20{
padding-top: 5rem;
}
Expand Down
Loading

1 comment on commit 507b4da

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for launched ready!

✅ Preview
https://launched-f7pc9jawq-mmmjbs-projects.vercel.app

Built with commit 507b4da.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.