Skip to content

Commit

Permalink
Housekeeping
Browse files Browse the repository at this point in the history
  • Loading branch information
croxton committed Dec 3, 2023
1 parent 5b690b4 commit d9fcbd3
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 14 deletions.
25 changes: 25 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
BSD 2-Clause License

Copyright (c) 2023, Hallmark Design
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ You want to run scripts when using `hx-boost` or `hx-get` swaps, and not have to

1. Include `components.min.js` in the `<head>` of your page, right after `htmx`:
```html
<script defer src="https://cdn.jsdelivr.net/gh/bigskysoftware/htmx/src/htmx.min.js"></script>
<script defer src="https://cdn.jsdelivr.net/gh/croxton/htmx-components/dist/components.min.js"></script>
<script defer src="https://cdn.jsdelivr.net/gh/bigskysoftware/htmx@1.9.9/src/htmx.min.js"></script>
<script defer src="https://cdn.jsdelivr.net/gh/croxton/htmx-components@1.0.1/dist/components.min.js"></script>
```

2. Create a folder in the webroot of your project to store components, e.g. `/scripts/components/.` Add a `<meta>` tag and set the `basePath` of your folder:
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" href="/styles/styles.css" />
<script
defer
src="https://cdn.jsdelivr.net/gh/bigskysoftware/htmx/src/htmx.min.js"
src="https://cdn.jsdelivr.net/gh/bigskysoftware/htmx@1.9.9/src/htmx.min.js"
></script>
<script defer src="/lib/ext/components.js"></script>
</head>
Expand Down
22 changes: 13 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
{
"name": "htmx-components",
"version": "1.0.0",
"description": "Minimal JS components for htmx",
"version": "1.0.1",
"description": "Minimal component framework for htmx",
"type": "module",
"exports": {
"./components": {
".": {
"import": "./dist/components.min.js"
},
"./history-preserve": {
"import": "./dist/history-preserve.min.js"
}
},
"files": [
Expand All @@ -19,9 +16,16 @@
"build": "vite build",
"preview": "vite preview"
},
"keywords": [],
"author": "",
"license": "ISC",
"repository": {
"type": "git",
"url": "git+https://github.com/croxton/htmx-components.git"
},
"keywords": [
"htmx",
"components"
],
"author": "Mark Croxton",
"license": "BSD 2-Clause",
"devDependencies": {
"vite": "^5.0.4"
}
Expand Down
2 changes: 1 addition & 1 deletion page2.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" href="/styles/styles.css" />
<script
defer
src="https://cdn.jsdelivr.net/gh/bigskysoftware/htmx/src/htmx.min.js"
src="https://cdn.jsdelivr.net/gh/bigskysoftware/htmx@1.9.9/src/htmx.min.js"
></script>
<script defer src="/lib/ext/components.js"></script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion page3.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" href="/styles/styles.css" />
<script
defer
src="https://cdn.jsdelivr.net/gh/bigskysoftware/htmx/src/htmx.min.js"
src="https://cdn.jsdelivr.net/gh/bigskysoftware/htmx@1.9.9/src/htmx.min.js"
></script>
<script defer src="/lib/ext/components.js"></script>
</head>
Expand Down

0 comments on commit d9fcbd3

Please sign in to comment.