Skip to content

Commit 9cb414d

Browse files
committed
many optimizations in the project / composer added
1 parent abc4f6d commit 9cb414d

9 files changed

+65
-19
lines changed

README.md

+22-5
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ Include AvalynxRef:
2626

2727
Replace `path/to/avalynx-ref.js` with the actual path to the file in your project.
2828

29-
## Installation via jsDelivr
29+
## Installation via jsDelivr ([Link](https://cdn.jsdelivr.net/npm/avalynx-ref/))
3030

3131
AvalynxRef is also available via [jsDelivr](https://www.jsdelivr.com/). You can include it in your project like this:
3232

3333
```html
34-
<script src="https://cdn.jsdelivr.net/npm/avalynx-ref/dist/avalynx-ref.js"></script>
34+
<script src="https://cdn.jsdelivr.net/npm/avalynx-ref@0.0.2/dist/js/avalynx-ref.min.js"></script>
3535
```
3636

37-
## Installation via NPM
37+
## Installation via NPM ([Link](https://www.npmjs.com/package/avalynx-ref))
3838

3939
AvalynxRef is also available as a npm package. You can add it to your project with the following command:
4040

@@ -60,6 +60,20 @@ After installing, you can import AvalynxRef into your JavaScript file like this:
6060
import { AvalynxRef } from 'avalynx-ref';
6161
```
6262

63+
## Installation via Composer ([Link](https://packagist.org/packages/avalynx/avalynx-ref))
64+
65+
AvalynxRef is also available as a Composer package. You can add it to your project with the following command:
66+
67+
```bash
68+
composer require avalynx/avalynx-loader
69+
```
70+
71+
After installing, you can import AvalynxLoader into your HTML file like this:
72+
73+
```html
74+
<script src="vendor/avalynx/avalynx-loader/dist/js/avalynx-loader.js"></script>
75+
```
76+
6377
## Usage
6478

6579
To use AvalynxRef in your project, include the AvalynxRef JavaScript file in your project and initialize the class with the appropriate selector.
@@ -80,10 +94,13 @@ myRef.value = "<p>Updated content</p>";
8094

8195
AvalynxRef allows the following options for customization:
8296

83-
- `selector`: (string) The selector to use for targeting tables within the DOM (default: `.avalynx-ref`).
97+
- `selector`: (string) The selector to use for targeting tables within the DOM (default: `'.avalynx-ref'`).
8498
- `options`: An object containing the following keys:
85-
- `isHtml`: (bool) Treat the value as HTML (default: `false`).
99+
- `isHtml`: (boolean) Treat the value as HTML (default: `false`).
86100

101+
## Planned Features
102+
- callback function for value change
103+
87104
## Contributing
88105

89106
Contributions are welcome! If you'd like to contribute, please fork the repository and submit a pull request with your changes or improvements. We're looking for contributions in the following areas:

composer.json

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "avalynx/avalynx-ref",
3+
"description": "AvalynxRef is a Ref implementation for updating elements with a value like React's Ref or Vue's Ref.",
4+
"keywords": [
5+
"avalynx",
6+
"ref",
7+
"vue",
8+
"react"
9+
],
10+
"homepage": "https://github.com/avalynx/avalynx-ref",
11+
"license": "MIT",
12+
"authors": [
13+
{
14+
"name": "Juergen Schwind an the AvalynxRef authors",
15+
"homepage": "https://github.com/avalynx/avalynx-ref/graphs/contributors"
16+
}
17+
],
18+
"repositories": [
19+
{
20+
"type": "vcs",
21+
"url": "https://github.com/avalynx/avalynx-ref.git"
22+
}
23+
]
24+
}

dist/js/avalynx-ref.esm.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@
1010
* @repository https://github.com/avalynx/avalynx-ref.git
1111
* @bugs https://github.com/avalynx/avalynx-ref/issues
1212
*
13-
* @param {string} selector - The selector for the element(s) to update.
14-
* @param {object} options - Options for the ref.
15-
* @param {boolean} options.isHtml - If the value is HTML.
13+
* @param {string} selector - The selector to use for targeting tables within the DOM (default: '.avalynx-ref').
14+
* @param {object} options - An object containing the following keys:
15+
* @param {boolean} options.isHtml - Treat the value as HTML (default: false).
16+
*
1617
*/
1718

1819
export class AvalynxRef {

dist/js/avalynx-ref.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@
1010
* @repository https://github.com/avalynx/avalynx-ref.git
1111
* @bugs https://github.com/avalynx/avalynx-ref/issues
1212
*
13-
* @param {string} selector - The selector for the element(s) to update.
14-
* @param {object} options - Options for the ref.
13+
* @param {string} selector - The selector to use for targeting tables within the DOM (default: '.avalynx-ref').
14+
* @param {object} options - An object containing the following keys:
15+
* @param {boolean} options.isHtml - Treat the value as HTML (default: false).
16+
*
1517
*/
1618

1719
class AvalynxRef {

docker-compose.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
version: "3.9"
21
services:
32
web:
43
build: ./docker/web
@@ -18,4 +17,4 @@ services:
1817
- PHP_MEMORY_LIMIT=512M
1918
- PHP_MAX_EXECUTION_TIME=300
2019
- PHP_POST_MAX_SIZE=100M
21-
- PHP_UPLOAD_MAX_FILESIZE=100M
20+
- PHP_UPLOAD_MAX_FILESIZE=100M

examples/random-values.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<script>hljs.highlightAll();</script>
1818

1919
<!-- AvalynxRef 0.0.2 -->
20-
<script src="../dist/js/avalynx-ref.js"></script>
20+
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/avalynx-ref.min.js"></script>
2121

2222
<!-- Example helper -->
2323
<link href="./css/helper.css" rel="stylesheet">

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "avalynx-ref",
33
"title": "AvalynxRef",
4-
"description": "AvalynxTable is a Ref implementation for updating elements with a value like React's Ref or Vue's Ref.",
4+
"description": "AvalynxRef is a Ref implementation for updating elements with a value like React's Ref or Vue's Ref.",
55
"version": "0.0.2",
66
"license": "MIT",
77
"main": "dist/js/avalynx-ref.js",

src/js/avalynx-ref.esm.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@
1010
* @repository https://github.com/avalynx/avalynx-ref.git
1111
* @bugs https://github.com/avalynx/avalynx-ref/issues
1212
*
13-
* @param {string} selector - The selector for the element(s) to update.
14-
* @param {object} options - Options for the ref.
15-
* @param {boolean} options.isHtml - If the value is HTML.
13+
* @param {string} selector - The selector to use for targeting tables within the DOM (default: '.avalynx-ref').
14+
* @param {object} options - An object containing the following keys:
15+
* @param {boolean} options.isHtml - Treat the value as HTML (default: false).
16+
*
1617
*/
1718

1819
export class AvalynxRef {

src/js/avalynx-ref.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@
1010
* @repository https://github.com/avalynx/avalynx-ref.git
1111
* @bugs https://github.com/avalynx/avalynx-ref/issues
1212
*
13-
* @param {string} selector - The selector for the element(s) to update.
14-
* @param {object} options - Options for the ref.
13+
* @param {string} selector - The selector to use for targeting tables within the DOM (default: '.avalynx-ref').
14+
* @param {object} options - An object containing the following keys:
15+
* @param {boolean} options.isHtml - Treat the value as HTML (default: false).
16+
*
1517
*/
1618

1719
class AvalynxRef {

0 commit comments

Comments
 (0)