@kipper/web
v0.12.0
Published
The standalone web-module for the Kipper compiler π¦
Downloads
16
Maintainers
Readme
Kipper Web Module - @kipper/web
π¦π
The standalone web-module for the Kipper Compiler. β¨οΈβ¨
Kipper is a JavaScript-like strongly and strictly typed language with Python flavour. It aims to provide straightforward, simple, secure and type-safe coding with better efficiency and developer satisfaction!
It compiles to both JavaScript and TypeScript, and can be set up in your terminal, Node.js or ES6+ browser. π¦π»
For more details, you can read more about this project on the project repository and the Kipper website.
General Information
- Website: https://kipper-lang.org
- Docs: https://docs.kipper-lang.org
- Playground: https://play.kipper-lang.org
- Issue Tracker: https://issues.kipper-lang.org
- Roadmap: View Kipper Roadmap π¦π§
- Changelog: View CHANGELOG.md
Usage
For running Kipper in the browser, you will have to include the kipper-standalone.min.js
file, which
provides the Kipper Compiler for the browser and enables the compilation of Kipper code to JavaScript.
Simple example of compiling and running Kipper code in a browser:
<!-- Kipper dependency -->
<script src="https://cdn.jsdelivr.net/npm/@kipper/web@latest/kipper-standalone.min.js"></script>
<!-- You won't have to define Kipper or anything after including the previous file. It will be defined per default -->
<!-- with the global 'Kipper' -->
<script type="module">
// Define your own logger and compiler, which will handle the compilation
const logger = new Kipper.KipperLogger((level, msg) => {
console.log(`[${Kipper.getLogLevelString(level)}] ${msg}`);
});
// Define your own compiler with your wanted configuration
const compiler = new Kipper.KipperCompiler(logger);
// Compile the code to JavaScript
// Top-level await ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await#top_level_await
const result = await compiler.compile(`call print("Hello world!");`, {
target: new KipperJS.TargetJS(),
});
const jsCode = result.write();
// Finally, run your program
eval(jsCode);
</script>
Kipper Docs
Proper documentation for the Kipper language is available at https://docs.kipper-lang.org!
Contributing to Kipper
If you want to contribute to Kipper, we have a full guide explaining the structure of Kipper and how to use GitHub issues and pull requests. Check it out here!
If you have any questions or concerns, you can open up a discussion page here!
We appreciate any feedback or help! Kipper is open-source and free for anyone, help us make it even better! π¦β€οΈ
Copyright and License
Copyright (C) 2021-2024 Luna Klatzer
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
See the LICENSE for information on terms & conditions for usage.