Skip to content
Snippets Groups Projects
Verified Commit 486a6bf5 authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

chore: commit save point

parent c103f399
No related branches found
No related tags found
No related merge requests found
Showing
with 67 additions and 36 deletions
# Monster
A modern, efficient and flexible JavaScript library for building user interfaces.
Monster relies on proven concepts mixed with many new JavaScript concepts.
Monster is perfectly suited for the creation of beautiful and fast
user interfaces and websites.
The library relies on modern features such as classes, WeakRef,
WeakMaps, proxies or the MutationObserver interface, to name a few.
Monster relies on proven concepts mixed with many new JavaScript concepts such as
classes, WeakRef, WeakMaps, proxies or the MutationObserver interface, just to name a few.
Monster integrates easily into your existing websites without taking over
everything.
Monster integrates easily into your existing websites without taking over everything.
It is not the goal of Monster to pull in an entirely new abstraction
with its own language, but to combine the existing techniques of HTML,
CSS and JavaScript in a meaningful way.
Monster is perfectly suited for the creation of beautiful and fast
user interfaces and websites. The basis is formed by core functions that
can be supplemented by necessary classes and objects.
One design target is to reach the shiny sun with as little JavaScript as possible.
Monster was built with ES6 modules and uses [import](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Statements/import)
......@@ -33,6 +27,45 @@ To check out docs and examples, visit [monsterjs.org/en/doc/monster/](https://mo
`npm install @schukai/monster`, `yarn install @schukai/monster` or `pnpm install @schukai/monster`
## Usage
A simple example of the use of functionality from Monster. We create a small file `index.mjs`.
The `m` in `.mjs` stands for module. In the example we want to make substitutions in a string.
```js
import {Formatter} from '@schukai/monster/source/text/formatter.mjs';
const text = '${mykey${subkey}}';
let obj = {
mykey2: "1",
subkey: "2"
};
new Formatter(obj).format(text);
// ↦ 1
```
To integrate this function into a website it is recommended to use a bundler like [esbuild](https://esbuild.github.io/).
```sh
esbuild index.mjs --outfile dist.js
```
We can now integrate that into our website.
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Monster</title>
<script src="dist.js"></script>
</head>
<body>
```
Voila!
### Polyfill
We do try to work around some browser bugs, but on the whole we don't use polyfills and feature detection.
......
'use strict';
/**
* Property-Keys
......
'use strict';
/**
* @author schukai GmbH
*/
// Copyright schukai GmbH and contributors 2022. All Rights Reserved.
// Node module: @schukai/monster
// This file is licensed under the AGPLv3 License.
// License text available at https://www.gnu.org/licenses/agpl-3.0.en.html
import {Base} from '../types/base.mjs';
......@@ -16,7 +14,7 @@ export {AbstractConstraint}
*
* The abstract constraint defines the api for all constraints. mainly the method isValid() is defined.
*
* derived classes must implement the method isValid().
* Derived classes must implement the method isValid().
*
* @since 1.3.0
* @copyright schukai GmbH
......
'use strict';
/**
* @author schukai GmbH
......
'use strict';
/**
* @author schukai GmbH
......
'use strict';
/**
* @author schukai GmbH
......
'use strict';
/**
* @author schukai GmbH
......
'use strict';
/**
* @author schukai GmbH
......
'use strict';
/**
* Constraints are used to define conditions that must be met by the value of a variable so that the value can be transferred to the system.
......
'use strict';
/**
* @author schukai GmbH
......
'use strict';
/**
* @author schukai GmbH
......
'use strict';
/**
* @author schukai GmbH
......
'use strict';
/**
* @author schukai GmbH
......
'use strict';
/**
* @author schukai GmbH
......
'use strict';
/**
* Namespace for datasources
......
'use strict';
/**
* @author schukai GmbH
......
'use strict';
/**
* Namespace for storages
......
'use strict';
/**
* @author schukai GmbH
......
'use strict';
/**
* @author schukai GmbH
......
'use strict';
/**
* @author schukai GmbH
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment