0.10.4 • Published 3 months ago

@kipper/web v0.10.4

Weekly downloads
-
License
GPL-3.0-or-later
Repository
github
Last release
3 months ago

npm.io

Kipper Web Module - @kipper/web

Version npm.io Issues License Install size Publish size

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! 🦊

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.KipperJavaScriptTarget(),
	});
	const jsCode = result.write();

	// Finally, run your program
	eval(jsCode);
</script>

Kipper Docs

Proper documentation for the Kipper language is available here!

Copyright and License

License FOSSA Status

Copyright (C) 2021-2022 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.

FOSSA License Report

FOSSA Status

0.11.0-alpha.1

3 months ago

0.10.3

10 months ago

0.10.4

9 months ago

0.11.0-alpha.0

11 months ago

0.10.2

11 months ago

0.10.0-rc.0

1 year ago

0.10.0-alpha.7

1 year ago

0.10.0

1 year ago

0.10.1

1 year ago

0.10.0-beta.0

1 year ago

0.10.0-alpha.6

1 year ago

0.10.0-alpha.5

2 years ago

0.10.0-alpha.4

2 years ago

0.10.0-alpha.3

2 years ago